This file contains 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
DB<1> $foo = 'Foo'; | |
DB<2> x ref $foo; | |
0 '' | |
DB<3> $foo->{bar} = 'Bar'; | |
DB<4> x ref $foo; | |
0 '' | |
DB<5> x $foo; | |
0 'Foo' |
This file contains 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
[davidp@shakermaker:~]$ cat /etc/init.d/site-ijedomestics | |
#! /bin/sh | |
# Simple script for starting Dancer applications. | |
SITENAME=ijedomestics | |
PORT=5000 | |
DIR=/websites/ijedomestics | |
SCRIPT=ijedomestics.pl | |
USER=davidp |
This file contains 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
#!/usr/bin/perl | |
use Dancer; | |
set template => 'template_toolkit'; | |
get '/' => sub { | |
return template 'index', { foo => [ qw(one two three four) ] }; | |
}; | |
dance; |
This file contains 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
[davidp@supernova:~/tmp/php-csv-test]$ php php-csv-test.php | |
array ( | |
0 => | |
array ( | |
'name' => 'David Precious', | |
'age' => '29', | |
'comment' => 'rocks', | |
), | |
) |
This file contains 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
plugins: | |
Database: | |
driver: pg | |
... | |
dbi_params: | |
pg_enable_utf8: 1 | |
This file contains 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
[davidp@supernova:~/tmp/dancer-multicookies]$ perl app.pl | |
>> Dancer 1.3010 server 25291 listening on http://0.0.0.0:4002 | |
== Entering the development dance floor ... | |
[25291] debug @0.003111> [hit #1]Cookies: { | |
"dancer.session" => bless({ name => "dancer.session", path => "/", value => ["123, wtf"] }, "Dancer::Cookie"), | |
} in /usr/local/share/perl/5.10.0/Dancer/Plugin/DebugDump.pm l. 19 |
This file contains 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
diff --git a/lib/Dancer/Cookies.pm b/lib/Dancer/Cookies.pm | |
index 15735fe..dd4992d 100644 | |
--- a/lib/Dancer/Cookies.pm | |
+++ b/lib/Dancer/Cookies.pm | |
@@ -23,7 +23,7 @@ sub parse_cookie_from_env { | |
return {} unless defined $env_str; | |
my $cookies = {}; | |
- foreach my $cookie ( split( '; ', $env_str ) ) { | |
+ foreach my $cookie ( split( /[,;]\s/, $env_str ) ) { |
This file contains 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
package i18ntest::I18N::en; | |
use base 'i18ntest::I18N'; | |
our %Lexicon = ( hello => 'Hello' ); | |
package i18ntest::I18N::fr; | |
use base 'i18ntest::I18N'; | |
our %Lexicon = ( hello => 'Bonjour' ); | |
package i18ntest; |
This file contains 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
# A quick Bot::BasicBot::Pluggable module to fetch a count of open pull requests | |
# for a GitHub project. | |
# | |
# David Precious <davidp@preshweb.co.uk> | |
package Bot::BasicBot::Pluggable::Module::GitHubPullRequests; | |
use strict; | |
use base 'Bot::BasicBot::Pluggable::Module'; | |
use LWP::Simple; | |
use JSON; |
This file contains 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
[davidp@supernova:~/tmp/runtimeloggerconfig]$ perl runtimeloggerconfig.pl | |
>> Dancer 1.3030 server 19286 listening on http://0.0.0.0:3000 | |
== Entering the development dance floor ... | |
^C | |
# a request was made, answered with the default error 500 page | |
[davidp@supernova:~/tmp/runtimeloggerconfig]$ cat logs/development.log | |
[davidp@supernova:~/tmp/runtimeloggerconfig]$ | |
# Nothing logged. |