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/Starman/Server.pm b/lib/Starman/Server.pm | |
index bf11ed4..6f51cb8 100644 | |
--- a/lib/Starman/Server.pm | |
+++ b/lib/Starman/Server.pm | |
@@ -31,6 +31,9 @@ sub run { | |
if ( $options->{pid} ) { | |
$extra{pid_file} = $options->{pid}; | |
} | |
+ if ( $options->{log_file} ) { | |
+ $extra{log_file} = $options->{log_file}; |
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/Plack/Runner.pm b/lib/Plack/Runner.pm | |
index de83a23..70b58b6 100644 | |
--- a/lib/Plack/Runner.pm | |
+++ b/lib/Plack/Runner.pm | |
@@ -50,6 +50,7 @@ sub parse_options { | |
'r|reload' => sub { $self->{loader} = "Restarter" }, | |
'R|Reload=s' => sub { $self->{loader} = "Restarter"; $self->loader->watch(split ",", $_[1]) }, | |
'L|loader=s' => \$self->{loader}, | |
+ "access-log=s" => \$self->{access_log}, | |
"h|help" => \$self->{help}, |
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 hack for demoing using App::p to produce graphs from the command-line | |
# using Perl 1-liners. | |
# | |
# E.g.: to look through an Apache access log file and produce a bar graph of | |
# requests by hour of the day (00-23): | |
# | |
# p -nE 'm{/2012:(\d\d)} && $tally{$1}++ }{ S ChartImage->bar_url(data => \%tally, size => "700x300")' access.log | |
# | |
# Use it, copy it, sell it, claim it as your own - I don't care :-) | |
# |
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
cpan-api$ prove -lv t/release/multiple-modules.t | |
t/release/multiple-modules.t .. | |
ok 1 - name ok | |
ok 2 - author ok | |
not ok 3 - Release is not first | |
# Failed test 'Release is not first' | |
# at t/release/multiple-modules.t line 19. | |
ok 4 - includes three files with modules | |
ok 5 - file name |
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
$ make test | |
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/live/*.t | |
t/basic.t ............... 1/? | |
# Failed test 'use Pithub;' | |
# at t/basic.t line 8. | |
# Tried to use 'Pithub'. | |
# Error: Invalid default 0 at /usr/local/share/perl/5.10.1/Method/Generate/Accessor.pm line 49. | |
# Compilation failed in require at /home/grant/.cpan/build/Pithub-0.01012-akcvbg/blib/lib/Pithub/Base.pm line 14. | |
# BEGIN failed--compilation aborted at /home/grant/.cpan/build/Pithub-0.01012-akcvbg/blib/lib/Pithub/Base.pm line 14. | |
# Compilation failed in require at /usr/local/share/perl/5.10.1/Module/Runtime.pm line 317. |
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
#!/bin/bash | |
ES_BINARY=/home/grant/elasticsearch-0.18.7/bin/elasticsearch | |
if [ -z "$1" ] | |
then | |
sudo $0 as-root $USER | |
stty sane | |
elif [ "$1" = "as-root" ] | |
then |
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/lib/MetaCPAN/Web/Controller/Search.pm | |
+++ b/lib/MetaCPAN/Web/Controller/Search.pm | |
@@ -22,6 +22,9 @@ sub index : Path { | |
$query =~ s{\.pm\b}{}; | |
} | |
+ # normalise ":", "'" and "-" separators to "::" | |
+ $query =~ s{\b[:'-]\b}{::}g; | |
+ | |
my $model = $c->model('API::Module'); |
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/MetaCPAN/Server/Diff.pm b/lib/MetaCPAN/Server/Diff.pm | |
index 2f90e6e..98c6306 100644 | |
--- a/lib/MetaCPAN/Server/Diff.pm | |
+++ b/lib/MetaCPAN/Server/Diff.pm | |
@@ -2,6 +2,7 @@ package MetaCPAN::Server::Diff; | |
use Moose; | |
use IPC::Run3; | |
+use Encoding::FixLatin qw(fix_latin); | |
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 useful addition to anyone's .bashrc | |
# | |
# Note, you don't want this function in effect on the remote host side of the scp transfer, | |
# so make sure to only define it for interactive shells, e.g.: wrap with: if [ ! -z "$PS1" ] | |
function scp() { | |
if echo "$@" | grep -q ':' | |
then | |
/usr/bin/scp "$@" | |
else |
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
# In my Dancer app I load a 'user' record like this: | |
my $user = User->find( param('id') ); # usually wrapped in a check that the record was found | |
# There are a number of 'moving parts' to allow this to work. | |
# Near the top of my Dancer code I have this: | |
OlderNewer