- 작성일 : 2012-05-15
- 작성자 : 김현승 ([email protected])
오래전 우리나라에서는 잊혀지고만 perl을 재조명해봅니다.
오래전 우리나라에서는 잊혀지고만 perl을 재조명해봅니다.
| package Dog; | |
| #use Any::Moose; | |
| use Moose; | |
| sub bark{ | |
| my $self = shift; | |
| print $self->word() x 2; | |
| print "\n"; |
| package Dog; | |
| #use Any::Moose; | |
| use Moose; | |
| has 'name'=>(is=>'rw'); | |
| sub bark{ | |
| my $self = shift; | |
| print $self->word() x 2; |
| #!/usr/bin/perl | |
| use strict; | |
| use File::Find; | |
| use Module::Which; | |
| use Module::ExtractUse; | |
| my %depend; | |
| finddepth({wanted=>\&wanted,follow_fast=>1} ,@ARGV); | |
| print join "\n",keys %depend; |
| ack --perl --no-group --no-filename '^(use |requires [\x{27}"])' */Makefile.PL */lib/ */bin/ */examples/ */t/ | sort | uniq |
| use AnyEvent; | |
| my $cv = AE::cv; | |
| my $t = AE::timer 2,0, sub{ | |
| my $cv2 = AE::cv; | |
| my $cnt = 10; | |
| my $tot = 0; | |
| foreach(1..10){ |
| use AnyEvent; | |
| my $cv = AE::cv; | |
| my $t = AE::timer 2,0, sub{ | |
| my $cv2 = AE::cv; | |
| my $cnt = 10; |
| use AnyEvent; | |
| use EV; | |
| my $cv = AE::cv; | |
| my $t = AE::timer 2,0, sub{ | |
| my $cv2 = AE::cv; | |
| my $cnt = 10; | |
| my $tot = 0; |
| #!/usr/bin/perl | |
| use utf8; | |
| use LWP::UserAgent; | |
| use Encode; | |
| use AnyEvent; | |
| binmode(STDOUT,":utf8"); | |
| my $cv = AE::cv; | |
| my $only_biz = 1; |
| sub index_array { | |
| my ($array, $key, $offset) = @_; | |
| my $i = 0; | |
| for my $i ($offset .. $#$array) { | |
| my $is_eql = 1; | |
| for my $j (0 .. $#$key) { | |
| last if $i + $j > $#$array; | |
| if ($key->[$j] ne $array->[$i + $j]) { |