Skip Menu |
 

This queue is for tickets about the Parse-PhoneNumber CPAN distribution.

Report information
The Basics
Id: 70867
Status: patched
Priority: 0/
Queue: Parse-PhoneNumber

People
Owner: TWILDE [...] cpan.org
Requestors: WINFINIT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.6
Fixed in: (no value)



Subject: issues under mod_perl
Download (untitled) / with headers
text/plain 1.6k
Hello, Parse::PhoneNumber is not a mod_perl friendly module due to its error handling. Error currently set not as a part of an object, but as a global, and there is no way currently to clear error after it was set, so error persist during life of apache child. there is simple solution, where we can just add clear_errstr function, which will clear $errstr variable: sub clear_errstr { $errstr = undef; } and additional change is to modify $^W =1; to just "use warnings", because it is far from optimal to include global warnings in your legacy application. patch below will cover both of those issues. thank you Roman. patch: *** /u/DIST/www-dist/u/autobahn/CPAN/Parse/PhoneNumber.pm 2011-08-10 21:02:25.000000000 -0400 --- /u/autobahn/CPAN/Parse/PhoneNumber.pm 2011-09-08 19:17:28.000000000 -0400 *************** *** 1,7 **** package Parse::PhoneNumber; # $Id: PhoneNumber.pm,v 1.8 2005/10/31 16:42:04 twilde Exp $ use strict; ! $^W = 1; use Carp; --- 1,7 ---- package Parse::PhoneNumber; # $Id: PhoneNumber.pm,v 1.8 2005/10/31 16:42:04 twilde Exp $ use strict; ! use warnings; use Carp; *************** *** 161,171 **** { my $errstr = undef; sub errstr { $errstr = $_[1] if $_[1]; $errstr } } package Parse::PhoneNumber::Number; use strict; ! $^W = 1; =head2 Parse::PhoneNumber::Number Objects --- 161,172 ---- { my $errstr = undef; sub errstr { $errstr = $_[1] if $_[1]; $errstr } + sub clear_errstr { $errstr = undef; } } package Parse::PhoneNumber::Number; use strict; ! use warnings; =head2 Parse::PhoneNumber::Number Objects
Download (untitled) / with headers
text/plain 2.2k
Good morning! Thanks for the patch below. I actually applied it a while ago but hadn't gotten around to rolling a release; sorry about that! I've just now uploaded version 1.7 to CPAN, so it should be filtering out soon, with your patch included. Thanks for your contribution! You can also find version 1.7 directly on the project's GitHub site: https://github.com/downloads/twilde/Parse-PhoneNumber/Parse-PhoneNumber-1.7.tar.gz Thanks again for your patch! Regards, Tim Wilde On Sat Sep 10 19:38:30 2011, WINFINIT wrote: Show quoted text
> Hello, > > Parse::PhoneNumber is not a mod_perl friendly module due to its error > handling. Error currently > set not as a part of an object, but as a global, and there is no way > currently to clear error after > it was set, so error persist during life of apache child. > > there is simple solution, where we can just add clear_errstr function, > which will clear $errstr > variable: > > sub clear_errstr { $errstr = undef; } > > and additional change is to modify $^W =1; to just "use warnings", > because it is far from > optimal to include global warnings in your legacy application. > > patch below will cover both of those issues. > > thank you > Roman. > > patch: > > *** /u/DIST/www-dist/u/autobahn/CPAN/Parse/PhoneNumber.pm 2011- > 08-10 > 21:02:25.000000000 -0400 > --- /u/autobahn/CPAN/Parse/PhoneNumber.pm 2011-09-08 > 19:17:28.000000000 -0400 > *************** > *** 1,7 **** > package Parse::PhoneNumber; > # $Id: PhoneNumber.pm,v 1.8 2005/10/31 16:42:04 twilde Exp $ > use strict; > ! $^W = 1; > > use Carp; > > --- 1,7 ---- > package Parse::PhoneNumber; > # $Id: PhoneNumber.pm,v 1.8 2005/10/31 16:42:04 twilde Exp $ > use strict; > ! use warnings; > > use Carp; > > *************** > *** 161,171 **** > { > my $errstr = undef; > sub errstr { $errstr = $_[1] if $_[1]; $errstr } > } > > package Parse::PhoneNumber::Number; > use strict; > ! $^W = 1; > > =head2 Parse::PhoneNumber::Number Objects > > --- 161,172 ---- > { > my $errstr = undef; > sub errstr { $errstr = $_[1] if $_[1]; $errstr } > + sub clear_errstr { $errstr = undef; } > } > > package Parse::PhoneNumber::Number; > use strict; > ! use warnings; > > =head2 Parse::PhoneNumber::Number Objects


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.