- or download this
($package,$symbol) = $qualified_name =~ /(.*)::(.*)/;
- or download this
RESULTS:
$qualified_name = 'My::Class::Path::func'
...
Benchmark: timing 100000 iterations of Jeff1, Jeff2...
Jeff1: 8 wallclock secs ( 8.95 usr + 0.00 sys = 8.95 CPU)
Jeff2: 9 wallclock secs ( 8.82 usr + 0.00 sys = 8.82 CPU)
- or download this
$qualified_name = 'My::Class::Path::myfuncdamnthisisareallylongstring'
Benchmark: timing 100000 iterations of Jeff1, Jeff2...
...
Benchmark: timing 100000 iterations of Jeff1, Jeff2...
Jeff1: 11 wallclock secs ( 9.12 usr + 0.00 sys = 9.12 CPU)
Jeff2: 8 wallclock secs ( 8.78 usr + 0.00 sys = 8.78 CPU)
- or download this
my ($pkg,$sym) = unpack
"A" . rindex($qualified_name, "::") . " x2 A*",
$qualified_name;