Re: PoCo::Generic suports Lowecase Methods ONLY ??? (was Non-blocking SOAP::Lite access with PoCo::Generic)
Martijn van Beers <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2008-06-23 at 12:38 -0430, Alejandro Imass wrote:
> Yep, indeed that is the problem. When PoCo::generic is mapping the
> methods it will discard anything that is not strictly lower case:
>
> ##################################################
> sub __method_map
> {
> my( $package, $method ) = @_;
> ($method =~ m/^(.+)\:\:([^\:]+)/);
> my $pk = $1;
> my $sub = $2;
>
> HERE-----> return unless $sub =~ /[a-z]$/; <------------ HERE
uh, you're reading it wrong. This regexo only checks if the last
character of the subname is lowercase.
> return if $sub =~ m/^_/ || $sub =~ m/(carp|croak|confess)$/;
> return ( $pk, $sub );
> }
>
> I suggest to change this regexp to: [^_A-Z] and to be consistent would
> change also the regexp here (it's missing the underscore).
Which also explains why the testing for underscore is a different
regexp.
Martijn