Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the URI-Find CPAN distribution.

Report information
The Basics
Id: 1845
Status: resolved
Priority: 0/
Queue: URI-Find

People
Owner: ROSCH [...] cpan.org
Requestors: tleffler [...] u.washington.edu
Cc:
AdminCc:

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



Subject: new requires code ref
I just read the Advent http://www.perladvent.org/2002/1st/ and this simple example fails: use URI::Find::Schemeless; # v0.13 my $text = "some text, www.washington.edu"; my $finder = URI::Find::Schemeless->new(); my $matches = $finder->find(\$text); with this error message: Use of uninitialized value in subroutine entry at /usr/lib/perl5/site_perl/5.6.0/URI/Find.pm line 126. Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/lib/perl5/site_perl/5.6.0/URI/Find.pm line 126. This implies that new() requires a code ref. A simple work-around ( e.g. new(sub {}) ) will do, but initializing with an empty code ref, or using defined would be better.
To: bug-URI-Find [...] rt.cpan.org
From: Roderick Schertler <roderick [...] argon.org>
Subject: Re: [cpan #1845] new requires code ref
Date: Wed, 04 Dec 2002 09:22:14 -0500
RT-Send-Cc:
On Tue, 3 Dec 2002 12:33:21 -0500 (EST), "Guest via RT" <bug-URI-Find@rt.cpan.org> said: Show quoted text
> > Use of uninitialized value in subroutine entry at /usr/lib/perl5/site_perl/5.6.0/URI/Find.pm line 126. > Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/lib/perl5/site_perl/5.6.0/URI/Find.pm line 126. > > This implies that new() requires a code ref. A simple work-around ( > e.g. new(sub {}) ) will do, but initializing with an empty code ref, > or using defined would be better.
URI::Find->new does require a code ref. The documentation doesn't say that the code ref is optional. What are you saying is the bug here? Are you unhappy that the error message isn't tailored to the problem? -- Roderick Schertler roderick@argon.org
To: bug-URI-Find [...] rt.cpan.org
From: Roderick Schertler <roderick [...] argon.org>
Subject: Re: [Comment] Re: [cpan #1845] new requires code ref
Date: Tue, 22 Mar 2005 12:22:28 -0500
RT-Send-Cc:
Version 0.15 of URI::Find, just uploaded, will croak() if you try to call any of its functions with the wrong number of arguments. -- Roderick Schertler roderick@argon.org