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
{ | |
my $log_fh; | |
sub debug { | |
my ($line) = @_; | |
if (not $log_fh) { | |
open($log_fh, ">>", "/var/log/redmine_pm.log") or die $!; | |
} | |
print $log_fh $line, "\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
$ sudo tcpflow -i lo -c port 9292 | |
tcpflow[9725]: listening on lo | |
127.000.000.001.43895-127.000.000.001.09292: POST /edit/eta_0 HTTP/1.1 | |
Host: 127.0.0.1:9292 | |
Connection: keep-alive | |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.8 (KHTML, like Gecko) Chrome/4.0.302.2 Safari/532.8 | |
Content-Length: 38 | |
Origin: chrome-extension://pcnigbkaeoldjecolfbanninfmcehpkl | |
Content-type: text/plain | |
Accept: */* |
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
<?php | |
$include_now = get_include_path(); | |
var_dump( array( 'include_now' => $include_now ) ); | |
set_include_path('One' . PATH_SEPARATOR . 'Two' . PATH_SEPARATOR . get_include_path()); | |
$include_now = get_include_path(); | |
var_dump( array( 'include_now_after_change' => $include_now ) ); |
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/Changes b/Changes | |
index a0cfc93..c19f1b7 100644 | |
--- a/Changes | |
+++ b/Changes | |
@@ -1,3 +1,20 @@ | |
+0.20 Sun Feb 28 00:29:32 GMT 2010 | |
+ | |
+ - Use Mouse instead of Moose by default but depend on both of | |
+ them. | |
+ |
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
s/iter Moose Mouse | |
Moose 17.5 -- -32% | |
Mouse 11.9 46% -- |
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
(defvar mysubs nil) | |
(dolist (i (loop for n from 1 to 10 collect n)) | |
(push #'(lambda () i) mysubs)) | |
(dolist (sub (reverse mysubs)) | |
(print (funcall sub))) | |
1 | |
2 | |
3 | |
4 |
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
sub register_prereqs { | |
my $self = shift; | |
my $arg = ref($_[0]) ? shift(@_) : {}; | |
my %prereq = @_; | |
confess "too late to register a prereq" if $self->is_finalized; | |
my $phase = $arg->{phase} || 'runtime'; | |
my $type = $arg->{type} || 'requires'; |
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
aoeu git-fail (master) $ perl add-fail.t git /home/avar/g/git/git | |
1..3 | |
# Testing git version git version 1.6.3.3 | |
ok 1 - ./file is ignored | |
ok 2 - ./dir/file is ignored | |
ok 3 - ./dir/dir/dir/file is ignored | |
aoeu git-fail (master) $ perl add-fail.t /home/avar/g/git/git | |
1..3 | |
# Testing git version git version 1.7.0.2.157.gb7e7f | |
ok 1 - ./file is ignored |
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 5.010; | |
use autodie; | |
use strict; | |
use File::Slurp qw[ slurp ]; | |
#BEGIN { *Pod::Simple::DEBUG = sub () { 9001 } } | |
use Pod::Text; | |
use File::Temp qw< tempdir tempfile >; | |
use IO::Handle; | |
use Test::More 'no_plan'; |
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
aoeu ~ (master) $ echo "téśt case" | nopaste -s Shadowcat | |
http://paste.scsys.co.uk/40625 | |
aoeu ~ (master) $ echo "téśt case" | nopaste -s Pastie | |
There is no form numbered 2 at /usr/local/share/perl/5.10.0/App/Nopaste/Service/Pastie.pm line 13 | |
http://pastie.org/865807 | |
aoeu ~ (master) $ echo "téśt case" | nopaste -s Gist | |
http://gist.github.com/329810 |