$AUTOLOAD =~ s/${pkg}::([^(?:::)]+)$/$1/;
Woops. Extended regex syntax does not work inside a character class. (It wouldn't be a character class if it did.)
[^(?:::)] will match any single character that
is not an open paren, a question mark, a colon, or a close paren.
It looks like you're trying to match a sequence of characters that does not include two colons in a row. This should work:
s/${pkg}::((?:[^:]+|:(?!:))+)$/$1/;
But I wonder if a simpler substitution would be more appropriate here:
s/${pkg}:://;
| [reply] [d/l] [select] |
You're right. Thanks for pointing that out.
| [reply] |
I did a similar thing with perl 5.6's lvalue subs about the
same time this node was created. You can find
a copy of Frog.pm
on my work website.
| [reply] |