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/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $toggle = 0; | |
my $handler_for_some_sig = sub { my $sig_name = shift; print "hey we caught $sig_name\n"; $toggle++; }; |
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
#!start included /usr/share/perl/5.8/ExtUtils/MANIFEST.SKIP | |
# Avoid version control files. | |
\bRCS\b | |
\bCVS\b | |
\bSCCS\b | |
,v$ | |
\B\.svn\b | |
\B\.git\b | |
\B\.gitignore\b |
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
get '/routers' => sub { | |
my $routers = schema->resultset('Router')->search({}, | |
{ join => [ qw/network device_type/ ], | |
prefetch => [ qw/network device_type/ ], | |
order_by => 'me.name' }); | |
my $networks = schema->resultset('Network')->search({}, | |
{ order_by => '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
#!perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use JSON; | |
my $number = 3.5; | |
my $string = 3.5; |
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
#!perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Carp; | |
use Params::Validate qw/validate/; | |
use Benchmark qw/cmpthese/; |
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
#!perl | |
use strict; | |
use warnings; | |
use 5.010; | |
my $escape = 0; | |
while (not $escape) { |
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
#!perl | |
use strict; | |
use warnings; | |
use IO::File; | |
my $target = shift or die 'no arg? go away'; | |
open my $fh, '>', $target |
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
use strict; | |
use warnings; | |
use 5.012; | |
use Carp; | |
use Moose; | |
use Moose::Util qw/apply_all_roles with_traits/; | |
use Test::More; | |
{ |
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
use 5.010; | |
use strict; | |
use warnings; | |
use Module::Build; | |
my $class = Module::Build->subclass(code => q{sub _share_dir_map { | |
my ($self, $prefix, $list) = @_; | |
my %files; | |
for my $dir ( @$list ) { | |
for my $f ( @{ $self->rscan_dir( $dir, sub {-f and not m/\B.svn/} )} ) { |
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
#!perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Carp; | |
eval 'require Package::Reloaded'; | |
if ($@) { say "exception: $@" } |
OlderNewer