Skip to content

Instantly share code, notes, and snippets.

View arodland's full-sized avatar

Andrew Rodland arodland

View GitHub Profile
diff --git a/modules/decide.pl b/modules/decide.pl
index 95f7321..d66a810 100644
--- a/modules/decide.pl
+++ b/modules/decide.pl
@@ -1,38 +1,37 @@
#!/usr/bin/perl
use strict;
+use Text::ParseWords;
+
#!/usr/bin/perl
use strict;
use Text::ParseWords;
sub decide {
my $self = shift;
my $event = shift;
my (@args) = ( $event->args );
package JSONTest;
use strict;
use warnings;
use Catalyst::Runtime '5.70';
use parent qw/Catalyst/;
use Catalyst qw/-Debug
ConfigLoader
my $total = 0;
while (($id, $weight) = $sth->fetchrow) {
$total += $weight;
push @choices, [$total, $id];
}
my $rand = rand($total);
my $chosen = undef;
for my $choice (@choices) {
package Log::LSB::InitMsg;
use strict;
use warnings;
# Call a function from /lib/lsb/init-functions in a shell
sub run_with_lsb {
my ($class, $funcname, @args) = @_;
my $ret = system('/bin/sh', '-c',
'. /lib/lsb/init-functions ; cmd=$1 ; shift ; $cmd "$@"',
andrew@mido:~$ nc -v -v dev.catalyst.perl.org 80
Connection to dev.catalyst.perl.org 80 port [tcp/www] succeeded!
OPTIONS /repos/bast/DBIx-Class HTTP/1.1
Host: dev.catalyst.perl.org
HTTP/1.1 200 OK
Date: Thu, 16 Jul 2009 02:52:34 GMT
Server: Apache/2.0.55 (Ubuntu) DAV/2 SVN/1.3.1 mod_fastcgi/2.4.2
DAV: 1,2
DAV: version-control,checkout,working-resource
package Devel::OverrideExit;
use strict;
use warnings;
my $exit_handler = sub {
CORE::exit $_[0];
};
BEGIN {
*CORE::GLOBAL::exit = sub { $exit_handler->(@_) };
Index: trunk/t/unit_stats.t
===================================================================
--- trunk/t/unit_stats.t (revision 10997)
+++ trunk/t/unit_stats.t (working copy)
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 14;
use Regexp::Grammars;
my $grammar = qr#
<[definition]> ** <separator> <.separator>?
<rule: separator> ; | \n
<rule: definition> <key> (?: : <value>)?
<rule: key> <MATCH=string>
<rule: value> <MATCH=string>
<rule: string> <MATCH=bareword> | <MATCH=quoted>
<rule: bareword> \w+