Re: PoCo::Generic suports Lowecase Methods ONLY ??? (was Non-blocking SOAP::Lite access with PoCo::Generic)

Alejandro Imass <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <1214259682.3536.113.camel@localhost>

El lun, 23-06-2008 a las 19:29 +0200, Martijn van Beers escribió:
> uh, you're reading it wrong. This regexo only checks if the last
> character of the subname is lowercase.

True, but it makes no difference because the effect is the same, and
IMHO it's broken. It will discard any method not ending in a lowercase
letter. I think it should discard all-caps methods ONLY.

> Which also explains why the testing for underscore is a different
> regexp.
> 

The point was that this check was in two places in the same code. In one
he uses /[^A-Z]/ and later in the map method he uses /[a-z]$/ ; they
seem to be checking for the same thing. My suggestion is to ONLY discard
all caps methods with:

unless( $method =~ /[^_A-Z]/ ){
    croak ...


ONLY in the AUTOLOAD sub, and get rid of the later check in the map sub.

> 
> Martijn
> 

Best,
Alejandro Imass
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBIYCHisbQbaqq693oRAsUyAKDaM4eq5VKO+BRYtgVn1uJdGJOLnwCgmZev
ukw96lCeSfVT/m2D8xTqbo8=
=ey5R
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.