This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[leejohnson@lees-macbook-air J0 C10206 14:40:37 * lee/make_this_work] | |
*/Users/leejohnson/working/mojolicious-plugin-oauth2-server/examples > perl -E 'my @array = (); say shift(@array)' | |
[leejohnson@lees-macbook-air J0 C10207 14:41:36 * lee/make_this_work] | |
*/Users/leejohnson/working/mojolicious-plugin-oauth2-server/examples > perl -E 'my @array = (); say shift(())' | |
Not an ARRAY reference at -e line 1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpanm (App::cpanminus) 1.7001 on perl 5.021008 built for darwin-2level | |
Work directory is /Users/leejohnson/.cpanm/work/1421839145.42553 | |
You have make /usr/bin/make | |
You have /opt/local/bin/wget | |
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 | |
You have /usr/bin/unzip | |
Searching Devel::NYTProf on cpanmetadb ... | |
--> Working on Devel::NYTProf | |
Fetching http://www.cpan.org/authors/id/T/TI/TIMB/Devel-NYTProf-5.06.tar.gz | |
-> OK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 my $renderer = Mojolicious::Plugin::TtRenderer::Engine->build( | |
117 mojo => $self, | |
118 template_options => { | |
119 INTERPOLATE => 0, | |
120 RELATIVE => 1, | |
121 ABSOLUTE => 1, | |
122 COMPILE_DIR => $compile_dir, | |
123 COMPILE_EXT => $compile_ext, | |
124 INCLUDE_PATH => [ qw/ | |
125 templates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have bigballofmud.pl that calls (requires) many littleballsofmud.pl, | |
none of which use strict and have many globals (there is no way i can | |
add use strict to any of these... yet). I want to add a new littleballofmud.pl, | |
but of course want to use strict. I still need to access the global | |
vars from bigballofmud.pl (and again, can't modify it to pass args) | |
but want littleballofmud.pl to be testable outside of bigballofmud.pl | |
under full strict *not* using globals. | |
My solution is this in littleballofmud.pl: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [type] == "syslog" { | |
grok { | |
match => { | |
message => "%{SYSLOGTIMESTAMP:timestamp} %{SYSLOGHOST:hostname} (%{SYSLOGHOST:remote} )?%{DATA:program}(?:\[%{POSINT:pid}\])?: (%{YEAR}/%{MONTHNUM}/%{MONTHDAY} %{TIME} )?%{GREEDYDATA:message_no_ts}" | |
} | |
add_tag => [ "%{[tag]}","syslog","%{[program]}" ] | |
} | |
date { | |
# we use the value of timestamp in the @timestamp field | |
match => [ "timestamp","MMM dd HH:mm:ss","MMM d HH:mm:ss" ] |
NewerOlder