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 | <1214240939.3536.95.camel@localhost> |
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
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). In fact,
since they would already be trapped in the AUTOLOAD the second check
above would be redundant.
sub AUTOLOAD
{
my $self = shift;
my $method = $AUTOLOAD;
$method =~ s/.*:://;
croak "$method not an object method" unless blessed $self;
HERE-----> unless( $method =~ /[^A-Z]/ ) { <-------- HERE
croak qq(Can't locate object method "$method" via package ")
.ref( $self ). qq(");
}
El lun, 23-06-2008 a las 12:00 -0430, Alejandro Imass escribió:
> Ok. I think I found the problem. It seems that PoCo::Generic will ONLY
> deal methods in lower case (-or- there is a encoding issue somewhere).
> Perlish indeed, but most SOAP implementations and service descriptors
> use mixed-case standard.
>
> I will keep experimenting but this seems to be the cause of all the
> problems. If it so, it is not mentioned anywhere in the documentation,
> but I managed to get some stuff working by using lower-case methods and
> underscore.
>
> FYI, and just in case, I am using es_VE_UTF-8.
>
> Best,
> Alejandro Imass
>
> El lun, 23-06-2008 a las 10:58 -0430, Alejandro Imass escribió:
> > This is a follow-up thread to the original posting by P Dobranski
> > <[email protected]> which can be found here:
> >
> > http://www.mail-archive.com/[email protected]/msg03985.html
> >
>
> [snip]
>
> >
> > Thanks,
> > Alejandro Imass
> >
> >
> >
> >
> >
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIX9irsbQbaqq693oRAsS4AKCw1DM6uBsccdnpMg3cvX5/Gxl0owCg31Ab vbXUQfIS4qJcCYaHHXDbpkU= =doSe -----END PGP SIGNATURE-----