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
Index: Build.PL | |
=================================================================== | |
--- Build.PL (revision 908) | |
+++ Build.PL (working copy) | |
@@ -22,6 +22,7 @@ | |
'CGI::Application::Plugin::TT' => 1.04, | |
'CGI::Application::Plugin::ValidateRM' => 2.3, | |
'Class::DBI' => 3.0, | |
+ 'Class::DBI::SQLite' => 0, | |
'Class::DBI::Plugin::RetrieveAll' => 1.04, |
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
Index: Build.pm | |
=================================================================== | |
--- Build.pm (revision 910) | |
+++ Build.pm (working copy) | |
@@ -66,6 +66,10 @@ | |
$ENV{SMOLDER_CONF} = $tmp_conf->filename; | |
$ENV{SMOLDER_TEST_HARNESS_ARCHIVE} = 1; | |
+ # make sure we create a DB first. Smolder will do this when it starts, | |
+ # but we still want to run some tests even if we fail to start smolder |
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
Index: Build.PL | |
=================================================================== | |
--- Build.PL (revision 909) | |
+++ Build.PL (working copy) | |
@@ -52,6 +52,7 @@ | |
'Pod::Usage' => 0, | |
'TAP::Harness::Archive' => 0.12, | |
'Template::Plugin::Cycle' => 0, | |
+ 'Template::Plugin::Number::Format' => 0, | |
'URI::Escape' => 0, |
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 | |
print (undef() > 10 ? "TRUE\n" : "FALSE\n"); | |
print (undef() < 10 ? "TRUE\n" : "FALSE\n"); | |
print (undef() == 10 ? "TRUE\n" : "FALSE\n"); | |
print (undef() == undef() ? "TRUE\n" : "FALSE\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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
my $add = ($0 =~ /\/uncomment$/ ? 0 : 1); | |
my $lang = lc(shift) || 'perl'; | |
my %comment_chars = ( | |
perl => '#', | |
bash => '#', |
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 Benchmark qw(:all); | |
my @strings = (123456, 1234567890, 1234567890123456); | |
foreach my $str (@strings) { | |
print "\nString of " . length($str) . " characters\n"; | |
cmpthese( | |
1000000, | |
{ | |
'length and substr' => sub { |
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 Benchmark qw(:all); | |
my @strings = (123456, 1234567890, 1234567890123456); | |
foreach my $str (@strings) { | |
print "\nString of " . length($str) . " characters\n"; | |
cmpthese( | |
1000000, | |
{ | |
'length and substr' => sub { |
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; | |
my $foo = 3; | |
my $ref1 = \$foo; | |
my $foo = 10; | |
my $ref2 = \$foo; | |
print "$$ref1"; | |
print "$$ref2"; |
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
String of three characters | |
-------------------------------------------------------------------------------- | |
using a quotemeta regex 277778/s -- -6% -56% | |
using a regex 294118/s 6% -- -53% | |
using eq 625000/s 125% 112% -- | |
String of five characters | |
-------------------------------------------------------------------------------- | |
using a quotemeta regex 250000/s -- -17% -60% | |
using a regex 303030/s 21% -- -52% |
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 strict; | |
use warnings; | |
use Benchmark qw(:all); | |
my %strings = ( | |
three => [[qw(foo bar baz fut)], 'bar'], | |
five => [[qw(foodi barsi bazie foots)], 'foodi'], | |
seven => [[qw(fooding barsing bazieys footsys)], 'bazieys'], | |
nine => [[qw(foodinges barsinges bazieyses footsysin)], 'footsysin'], |
OlderNewer