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 -w | |
use strict; | |
use Benchmark qw(:all); | |
use Sub::Call::Tail; | |
sub foo{ 1 } | |
sub tailcall{ | |
tail foo(1, 2, 3); | |
} |
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 -w | |
use strict; | |
use Test::More; | |
#my $tests = 0; | |
#sub is{ | |
# my($got, $expected) = @_; | |
# print $got eq $expected ? 'ok ' : 'not ok '; | |
# print ++$tests, "\n"; | |
#} |
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
t/00_compile.t ............... ok | |
t/01_object.t ................ ok | |
t/02_singleton.t ............. ok | |
t/03_args_and_initializer.t .. ok | |
t/04_export.t ................ ok | |
t/05_subclass.t .............. ok | |
xt/pod.t ..................... ok | |
xt/pod_coverage.t ............ ok | |
# Failed test 'POD spelling for lib/Object/Container/ja.pod' |
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 -w | |
# $ perl -Mblib benchmark-reftype.pl | |
# $ perl benchmark-reftype.pl | |
use strict; | |
use Benchmark qw(:all); | |
use Scalar::Util; | |
my $ref = {}; |
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
/* C++ */ | |
/* $ g++ foo.cpp && ./a.out */ | |
#include <iostream> | |
#include <cstring> | |
int count(const char *str, char ch); | |
using namespace std; | |
int main(void) { |
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/cpanm b/cpanm | |
index abf9d09..b368a13 100755 | |
--- a/cpanm | |
+++ b/cpanm | |
@@ -1,6 +1,7 @@ | |
#!/usr/bin/perl | |
use strict; | |
use File::Basename qw(basename); | |
+use Fatal qw(chdir); | |
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/cpanm b/cpanm | |
index 4b4e71c..366958f 100755 | |
--- a/cpanm | |
+++ b/cpanm | |
@@ -4,18 +4,18 @@ use Config; | |
use File::Basename qw(basename); | |
use Fatal qw(chdir); | |
use Parse::CPAN::Meta; | |
+use File::Spec; | |
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/cpan-outdated b/cpan-outdated | |
index fdb9331..9daa3ee 100755 | |
--- a/cpan-outdated | |
+++ b/cpan-outdated | |
@@ -42,11 +42,14 @@ sub main { | |
my $inst_version = MM->parse_version($path); | |
$inst_version =~ s/\s+//; # workaround for Attribute::Params::Validate | |
if ($inst_version ne $version && CPAN::Version->vlt($inst_version, $version)) { | |
- next if $seen{$dist}++; | |
+ my $name = $dist; |
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; | |
printf "Perl/%vd\n", $^V; | |
print "Moose/$Moose::VERSION\n"; | |
#print "Mouse/$Mouse::VERSION\n"; | |
{ | |
package PlainMoose; | |
use Moose; | |
has foo => (is => 'rw'); |
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 -w | |
use Any::Moose; | |
use Any::Moose '::Util::TypeConstraints'; | |
use Math::BigInt; | |
subtype 'BigInt', as 'Math::BigInt'; | |
coerce 'BigInt', | |
from 'Int', via { Math::BigInt->new($_) }; | |
has value => ( |