Skip Menu |

This queue is for tickets about the Number-Format CPAN distribution.

Report information
The Basics
Id: 26079
Status: resolved
Priority: 0/
Queue: Number-Format

People
Owner: WRW [...] cpan.org
Requestors: mhearne [...] usgs.gov
Cc:
AdminCc:

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



Subject: format_number() error
Date: Tue, 3 Apr 2007 16:00:34 -0600
To: bug-Number-Format [...] rt.cpan.org
From: Michael Hearne <mhearne [...] usgs.gov>
In certain cases, that I unfortunately cannot reproduce easily (i.e., without including all of my supporting source code), I get the following error: Can't call method "format_number" on an undefined value at ... This occurs (in this one bit of code) even when I wrap the offending line with something like: if (defined($pop2)){ $popS = $nf->format_number($pop2); } Number::Format info: Module id = Number::Format DESCRIPTION Package for formatting numbers for display CPAN_USERID WRW (William R Ward <bill@wards.net>) CPAN_VERSION 1.52 CPAN_FILE W/WR/WRW/Number-Format-1.52.tar.gz DSLI_STATUS RdpO (released,developer,perl,object-oriented) MANPAGE Number::Format - Perl extension for formatting numbers INST_FILE /Library/Perl/5.8.6/Number/Format.pm INST_VERSION 1.52 Perl info: This is perl, v5.8.6 built for darwin-thread-multi-2level (with 3 registered patches, see perl -V for more detail) Platform is Intel Mac OS X, Darwin Kernel Version 8.9.1. Thanks, Mike Hearne ---------------------------------------------------------------- Michael Hearne mhearne@usgs.gov (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ----------------------------------------------------------------
Subject: Re: [rt.cpan.org #26079] format_number() error
Date: Tue, 3 Apr 2007 18:44:08 -0400
To: bug-Number-Format [...] rt.cpan.org
From: "Bill Ward" <bill [...] wards.net>
In your example code it is $nf that is undefined, not $pop2. Sounds like something wrong in your code, most likely. On 4/3/07, Michael Hearne via RT <bug-Number-Format@rt.cpan.org> wrote: Show quoted text
> > Tue Apr 03 18:00:57 2007: Request 26079 was acted upon. > Transaction: Ticket created by mhearne@usgs.gov > Queue: Number-Format > Subject: format_number() error > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mhearne@usgs.gov > Status: new > Ticket <URL: > http://rt.cpan.org/Ticket/Display.html?id=26079 > > > > In certain cases, that I unfortunately cannot reproduce easily (i.e., > without including all of my supporting source code), I get the > following error: > > Can't call method "format_number" on an undefined value at ... > > This occurs (in this one bit of code) even when I wrap the offending > line with something like: > > if (defined($pop2)){ > $popS = $nf->format_number($pop2); > } > > Number::Format info: > Module id = Number::Format > DESCRIPTION Package for formatting numbers for display > CPAN_USERID WRW (William R Ward <bill@wards.net>) > CPAN_VERSION 1.52 > CPAN_FILE W/WR/WRW/Number-Format-1.52.tar.gz > DSLI_STATUS RdpO > (released,developer,perl,object-oriented) > MANPAGE Number::Format - Perl extension for formatting numbers > INST_FILE /Library/Perl/5.8.6/Number/Format.pm > INST_VERSION 1.52 > > Perl info: > This is perl, v5.8.6 built for darwin-thread-multi-2level > (with 3 registered patches, see perl -V for more detail) > > Platform is Intel Mac OS X, Darwin Kernel Version 8.9.1. > > Thanks, > > Mike Hearne > > > > > > ---------------------------------------------------------------- > Michael Hearne > mhearne@usgs.gov > (303) 273-8620 > USGS National Earthquake Information Center > 1711 Illinois St. Golden CO 80401 > Senior Software Engineer > Synergetics, Inc. > ---------------------------------------------------------------- > > > > > > > In certain cases, that I unfortunately cannot reproduce easily (i.e., > without including all of my supporting source code), I get the following > error: > > Can't call method "format_number" on an undefined value at ... > > This occurs (in this one bit of code) even when I wrap the offending line > with something like: > > if (defined($pop2)){ > $popS = $nf->format_number($pop2); > } > > Number::Format info: > Module id = Number::Format > DESCRIPTION Package for formatting numbers for display > CPAN_USERID WRW (William R Ward <bill@wards.net>) > CPAN_VERSION 1.52 > CPAN_FILE W/WR/WRW/Number-Format-1.52.tar.gz > DSLI_STATUS RdpO > (released,developer,perl,object-oriented) > MANPAGE Number::Format - Perl extension for formatting numbers > INST_FILE /Library/Perl/5.8.6/Number/Format.pm > INST_VERSION 1.52 > > Perl info: > This is perl, v5.8.6 built for darwin-thread-multi-2level > (with 3 registered patches, see perl -V for more detail) > > Platform is Intel Mac OS X, Darwin Kernel Version 8.9.1. > > Thanks, > > Mike Hearne > > > > > > ---------------------------------------------------------------- > Michael Hearne > mhearne@usgs.gov > (303) 273-8620 > USGS National Earthquake Information Center > 1711 Illinois St. Golden CO 80401 > Senior Software Engineer > Synergetics, Inc. > ---------------------------------------------------------------- > > > > > >
-- Help bring back the San Jose Earthquakes - http://www.soccersiliconvalley.com/
Subject: Re: [rt.cpan.org #26079] format_number() error
Date: Wed, 4 Apr 2007 11:34:40 -0600
To: bug-Number-Format [...] rt.cpan.org
From: Michael Hearne <mhearne [...] usgs.gov>
Bill - Thanks. You were right of course, $nf was undefined, so I'll take 99% of the blame for this. The other 1% goes to whoever wrote the error message that says "Can't call method 'format_number' on an undefined value"... Written that way, it reads to me like it's argument is undefined, not the object variable it's supposed to be a member of. Sheepishly, Mike Hearne On Apr 3, 2007, at 4:44 PM, Bill Ward via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26079 > > > In your example code it is $nf that is undefined, not $pop2. Sounds > like something wrong in your code, most likely. > > On 4/3/07, Michael Hearne via RT <bug-Number-Format@rt.cpan.org> > wrote:
>> >> Tue Apr 03 18:00:57 2007: Request 26079 was acted upon. >> Transaction: Ticket created by mhearne@usgs.gov >> Queue: Number-Format >> Subject: format_number() error >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: mhearne@usgs.gov >> Status: new >> Ticket <URL: >> http://rt.cpan.org/Ticket/Display.html?id=26079 > >> >> >> In certain cases, that I unfortunately cannot reproduce easily (i.e., >> without including all of my supporting source code), I get the >> following error: >> >> Can't call method "format_number" on an undefined value at ... >> >> This occurs (in this one bit of code) even when I wrap the offending >> line with something like: >> >> if (defined($pop2)){ >> $popS = $nf->format_number($pop2); >> } >> >> Number::Format info: >> Module id = Number::Format >> DESCRIPTION Package for formatting numbers for display >> CPAN_USERID WRW (William R Ward <bill@wards.net>) >> CPAN_VERSION 1.52 >> CPAN_FILE W/WR/WRW/Number-Format-1.52.tar.gz >> DSLI_STATUS RdpO >> (released,developer,perl,object-oriented) >> MANPAGE Number::Format - Perl extension for formatting >> numbers >> INST_FILE /Library/Perl/5.8.6/Number/Format.pm >> INST_VERSION 1.52 >> >> Perl info: >> This is perl, v5.8.6 built for darwin-thread-multi-2level >> (with 3 registered patches, see perl -V for more detail) >> >> Platform is Intel Mac OS X, Darwin Kernel Version 8.9.1. >> >> Thanks, >> >> Mike Hearne >> >> >> >> >> >> ---------------------------------------------------------------- >> Michael Hearne >> mhearne@usgs.gov >> (303) 273-8620 >> USGS National Earthquake Information Center >> 1711 Illinois St. Golden CO 80401 >> Senior Software Engineer >> Synergetics, Inc. >> ---------------------------------------------------------------- >> >> >> >> >> >> >> In certain cases, that I unfortunately cannot reproduce easily (i.e., >> without including all of my supporting source code), I get the >> following >> error: >> >> Can't call method "format_number" on an undefined value at ... >> >> This occurs (in this one bit of code) even when I wrap the >> offending line >> with something like: >> >> if (defined($pop2)){ >> $popS = $nf->format_number($pop2); >> } >> >> Number::Format info: >> Module id = Number::Format >> DESCRIPTION Package for formatting numbers for display >> CPAN_USERID WRW (William R Ward <bill@wards.net>) >> CPAN_VERSION 1.52 >> CPAN_FILE W/WR/WRW/Number-Format-1.52.tar.gz >> DSLI_STATUS RdpO >> (released,developer,perl,object-oriented) >> MANPAGE Number::Format - Perl extension for formatting >> numbers >> INST_FILE /Library/Perl/5.8.6/Number/Format.pm >> INST_VERSION 1.52 >> >> Perl info: >> This is perl, v5.8.6 built for darwin-thread-multi-2level >> (with 3 registered patches, see perl -V for more detail) >> >> Platform is Intel Mac OS X, Darwin Kernel Version 8.9.1. >> >> Thanks, >> >> Mike Hearne >> >> >> >> >> >> ---------------------------------------------------------------- >> Michael Hearne >> mhearne@usgs.gov >> (303) 273-8620 >> USGS National Earthquake Information Center >> 1711 Illinois St. Golden CO 80401 >> Senior Software Engineer >> Synergetics, Inc. >> ---------------------------------------------------------------- >> >> >> >> >> >>
> > > -- > Help bring back the San Jose Earthquakes - http:// > www.soccersiliconvalley.com/
---------------------------------------------------------------- Michael Hearne mhearne@usgs.gov (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ----------------------------------------------------------------

Message body is not shown because it is too large.