This file contains hidden or 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
( | |
$1 eq 'raw' ? $raw | |
: $1 eq 'install' ? $install | |
: $download | |
) = 1; |
This file contains hidden or 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
D:\perl5i>cpan true | |
Fetching with LWP: | |
http://www.perl.org/CPAN/authors/01mailrc.txt.gz | |
Fetching with LWP: | |
http://www.perl.org/CPAN/modules/02packages.details.txt.gz | |
Fetching with LWP: | |
http://www.perl.org/CPAN/modules/03modlist.data.gz | |
Build_dir empty, nothing to restore | |
Database was generated on Wed, 09 Feb 2011 09:34:06 GMT |
This file contains hidden or 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
package Exporter; | |
require 5.006; | |
# Be lean. | |
#use strict; | |
#no strict 'refs'; | |
our $Debug = 0; | |
our $ExportLevel = 0; |
This file contains hidden or 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
D:\traffics\true\true-0.16>dmake | |
cp lib/true.pm blib\lib\true.pm | |
cp lib/true/VERSION.pm blib\lib\true\VERSION.pm | |
C:\Perl\bin\perl.exe C:\Perl\site\lib\ExtUtils\xsubpp -typemap C:\Perl\lib\ExtUtils\typemap true.xs > true.xsc && C:\Perl\bin\perl.exe -MExtUtils::Command -e "mv" -- true.xsc true.c | |
C:/MinGW/bin/gcc.exe -c -IC:\Perl\site\lib\B\Hooks\OP\Check\Install -IC:\Perl\site\lib\B\Hooks\OP\Annotation\Install -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O3 -Wall -W -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\" "-IC:\Perl\lib\CORE" true.c | |
In file included from C:\Perl\lib\CORE/perl.h:38:0, | |
from true.xs:4: | |
C:\Perl\lib\CORE/config.h:39:20: warning: "/*" within comment | |
C:\Perl\lib\CORE/config.h:45:21: warning: "/*" within comment |
This file contains hidden or 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 Modern::Perl; | |
package mi_count; | |
use File::Find::Rule; | |
use Smart::Comments; | |
use Capture::Tiny 'capture'; |
This file contains hidden or 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; | |
use Benchmark 'timethis'; | |
timethis( -5, sub { f(18) }, 'fibonacci' ); | |
sub fib { | |
return $_[0] < 2 ? $_[0] : fib($_[0]-1) + fib($_[0]-2) | |
} |
This file contains hidden or 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; | |
use Benchmark 'timethis'; | |
timethis( | |
1, | |
sub { | |
my $str; | |
$str .= ' ' for 0..20_000_000; |
This file contains hidden or 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
package TeeToFile; | |
use FileHandle; | |
use PerlIO::Util; | |
use base 'Exporter'; | |
our @EXPORT_OK = qw( tee_child tee ); | |
sub tee { | |
my ( $log_file, $code ) = @_; |
This file contains hidden or 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
= SYNOPSIS | |
use Capture::Tiny::Extended qw/capture tee capture_merged tee_merged/; | |
# capture return values | |
($stdout, $stderr, @return) = capture { | |
# your code here | |
}; |
This file contains hidden or 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
#!/bin/sh | |
# change to home dir | |
cd $HOME | |
# erzeuge log file name basierend auf Datum, Zeit und Prozess ID | |
log=log/t5-download-lf10-`date '+%y%m%dT%H%M'`.$$.log | |
exec 0<&- | |
exec 1> $log | |
exec 2>&1 |