Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

  reversethis-{gro.napc} {ta} {nbsanoj}
AOL IM: BJonasN (Add Buddy, Send Message)

Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer

and maintainer of:

  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Saturday October 23, 2004
02:21 AM

Bug in

[ #21478 ]

My little script which is shipped with Module::Info::File, the subclass of Module::Info seems to have a bug, it gives the following error: "Can't call method "version" on unblessed reference at ./ line 64".

I have not located the bug myself but I received a mail from another danish guy who got an error running it with the CGI module on a Linux box running perl 5.8.5 (perl, v5.8.5 built for i686-linux-thread-multi).

I have mailed back and forth with the guy in order to obtain some data to resolve the bug. Since the problem is not as simple a programming mistake from my side (unfortunately).

The problem is that the class Module::Info::File is a subclass of Module::Info, which is not my module and when calling the script with a module name (also the last resort), I use the method new_from_module from Module::Info.

So I have obtained the following data from the bug reporter:

  • is version 0.04, which is the latest shipped with
  • Module::Info::File, which is version 0.07
  • Module::Info, version 0.26 (which is latest version)

I also mailed him a version, with an enable debug flag and got the following result:

$VAR1 = {
         'name' => 'CGI',
         'dir' => '/usr/local/perl-5.8.5/lib/5.8.5'

Which also eliminates the problem if he had been using the script in an unforseen way (though the script can handle several types of arguments).

I also got the following:

$VAR1 = bless( {
                'version' => '1.07',
                'name' => 'File::Find',
                'file' => '/usr/local/perl-5.8.5/lib/5.8.5/File/',
                'dir' => '/usr/local/perl-5.8.5/lib/5.8.5'
              }, 'Module::Info::File' );
File::Find located in /usr/local/perl-5.8.5/lib/5.8.5 is version: 1.07

This shows that the script is actually working. So I asked a fellow Perl Monger to test this script, since he was running perl 5.8.5, on FreeBSD though, but he could not replicate the problem and he got perfect data for CGI.

I have now mailed the bug reporter and asked him to test with other short module names like: DBI or DateTime, it is going to be interesting to see what shows up.

I am also working on a test to demonstrate the problem.

Suggestions for other attempts are more then welcome.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.