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