line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: Axelerator.pm,v 0.2 2009/02/15 02:25:03 dankogai Exp dankogai $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Class::Axelerator; |
5
|
1
|
|
|
1
|
|
48700
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
7
|
|
|
|
|
|
|
our $VERSION = sprintf "%d.%02d", q$Revision: 0.2 $ =~ /(\d+)/g; |
8
|
1
|
|
|
1
|
|
11801
|
use Filter::Simple; |
|
1
|
|
|
|
|
130056
|
|
|
1
|
|
|
|
|
9
|
|
9
|
|
|
|
|
|
|
our $DEBUG = 0; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
FILTER_ONLY code => sub { |
12
|
|
|
|
|
|
|
s{ |
13
|
|
|
|
|
|
|
-> # arrow operator |
14
|
|
|
|
|
|
|
([A-Za-z_][0-9A-Za-z_]+) # method name |
15
|
|
|
|
|
|
|
(\(?) # explicitly invoked? |
16
|
|
|
|
|
|
|
}{ |
17
|
|
|
|
|
|
|
$2 ? "->$1$2" # leave it alone |
18
|
|
|
|
|
|
|
: "->{$1}" # make it a simple hash deref |
19
|
|
|
|
|
|
|
}msegx; |
20
|
|
|
|
|
|
|
warn $_ if $DEBUG; |
21
|
|
|
|
|
|
|
$_; |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; # End of Class::Axelerator |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |