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 v5.19; | |
use strict; | |
use warnings; | |
# This isn't strictly necessary, I just want to use them. | |
use feature 'signatures'; | |
no warnings 'experimental::signatures'; |
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 v5.10; | |
use strict; | |
use warnings; | |
use Benchmark qw(cmpthese); | |
{ | |
package MS; |
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 | |
# This turns on function signatures and autoboxing | |
# amongst a lot of other things. | |
use perl5i::2; | |
# This class adds methods callable on all scalar variables. | |
{ | |
package SCALAR; | |
use perl5i::2; |
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 perl5i::2; | |
# A full on Integer class. | |
{ | |
package Integer; | |
use perl5i::2; | |
use Method::Signatures; |
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 perl5i::2; | |
# A full on Integer class. | |
{ | |
package _Integer; | |
use perl5i::2; | |
use Method::Signatures; |
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 v5.10; | |
use strict; | |
use warnings; | |
use Benchmark qw(cmpthese); | |
my @list = (1..1_000_000); | |
local $, = ''; |
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
$ ps auwx | head -1 | |
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND | |
$ ps auwx | grep perl | |
schwern 3574 0.0 0.0 2442000 628 s000 S+ 10:50AM 0:00.00 grep perl | |
schwern 3567 0.0 1.0 2507496 80168 s001 S 10:50AM 0:00.13 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; sleep 9999 | |
schwern 3558 0.0 1.0 2517736 80244 s001 S 10:50AM 0:00.56 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; print {$fh} $_ for @list; sleep 9999 | |
schwern 3557 0.0 1.0 2525928 80232 s001 S 10:50AM 0:00.45 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; print $fh @list; sleep 9999 |
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 Devel::Peek; | |
sub foo { | |
print Dump( \@_ ); | |
} | |
my @list = qw(1 2 3); | |
foo(@list); |
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
$ ps auwx | head -1 | |
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND | |
$ ps auwx | grep perl | |
schwern 4311 0.0 0.0 2442000 620 s000 S+ 3:30PM 0:00.00 grep perl | |
schwern 4309 0.1 1.0 2515688 80204 s001 S 3:30PM 0:00.14 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; sub foo {} foo(); sleep 9999 | |
schwern 4301 0.0 1.0 2525552 88052 s001 S 3:30PM 0:00.14 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; sub foo {} foo(@list); sleep 9999 | |
schwern 4304 0.0 1.0 2525928 80232 s001 S 3:30PM 0:00.47 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; sub foo {} print {$fh} @list; sleep 9999 | |
schwern 4336 0.0 1.0 2517736 80236 s001 S 3:35PM 0:00.47 perl -wle my @list = (1..1_000_000); open my $fh, ">>", "/dev/null"; sub foo {} print {$fh} @list, "foo"; sleep 9999 |
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 | |
{ | |
package App::Cmd::Bug; | |
use App::Cmd::Setup -app; | |
BEGIN { $INC{"App/Cmd/Bug.pm"} = 1; } | |
} | |
{ | |
package App::Cmd::Bug::Command::foo; |
OlderNewer