Draft. Plase post a comment on gist.
Most programming languages have a native Boolean data type. Perl does not.
[5.18.0] perl foo.pl | |
2013-09-05 | |
[5.18.0] perl bar.pl | |
Bareword "ONE_DAY" not allowed while "strict subs" in use at bar.pl line 6. | |
Execution of bar.pl aborted due to compilation errors. |
use strict; | |
use warnings; | |
use 5.008001; | |
# Module code. | |
{ | |
package Scalar::Bool; | |
use parent qw(Exporter); | |
use Scalar::Util (); |
diff --git a/lib/SQLite_File.pm b/lib/SQLite_File.pm | |
index 90456a3..991ea40 100755 | |
--- a/lib/SQLite_File.pm | |
+++ b/lib/SQLite_File.pm | |
@@ -282,7 +282,7 @@ sub TIEHASH { | |
} | |
else { | |
# if no file specified, use a temp file... | |
- ($fh, $file) = tempfile(); | |
+ ($fh, $file) = tempfile(EXLOCK => 0); |
package Try; | |
use Carp; | |
$Carp::Internal{+__PACKAGE__}++; | |
*main::try = \&try; | |
sub try (&;%) { } | |
1; |
1.5021 で render の recursion call における segv が解消されている。 | |
1.5020 で 1.5016 で導入されたキャッシュまわりのバグが解消されている。 | |
1.5015以前にはキャッシュのリロードに失敗するバグがある | |
↓ | |
結論としてすべての Xslate ユーザーは 1.5021 以後にアップデートするべき。 |
# Foo.tra | |
my $Foo = class { | |
sub new() { | |
self.bless({}) | |
} | |
sub bar() { | |
p("YAY"); | |
} | |
} | |
$EXPORTABLE = $Foo; |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use 5.010000; | |
use Text::Xslate; | |
use Data::Section::Simple qw(get_data_section); | |
my $xslate = Text::Xslate->new( |
#!/usr/bin/env sudo perl | |
use utf8; | |
use strict; | |
use warnings; | |
use lib lib => glob 'modules/*/lib'; | |
use Net::DNS::Nameserver; | |
use Path::Class; | |
use Perl6::Say; |
sub random_string { | |
my $length = shift; | |
my @chars = ( 'A' .. 'Z', 'a' .. 'z', '0' .. '9' ); | |
my $ret; | |
for ( 1 .. $length ) { | |
$ret .= $chars[ int rand @chars ]; | |
} | |
return $ret; | |
} |