[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    Re: Bundle::CPAN install error
From:       "Tom Phoenix" <tom () stonehenge ! com>
Date:       2007-09-29 5:28:44
Message-ID: 31086b240709282228w692cfa28ja62a368b57437b8a () mail ! gmail ! com
[Download RAW message or body]

On 9/27/07, Bobby <bobby@d4business.com> wrote:

> for my $m (@m) {
>   local $^W = 0;
>   eval "require $m";
>   ok($m->VERSION >= 1.76, sprintf "Found version > 1.76 for %20s: %s", $m,
> $m->VERSION);
> }

Somewhere in this loop is where I suspect it's getting stuck. But the
code's author has turned off warnings by setting $^W to 0, and that
may be hiding useful information from us.

I think you'll need to make a modified copy of that code and run it
from the command line. (Better yet, step through it in the debugger.)
I'd start by replacing that whole loop with something like this:

  use warnings; use strict;  # just in case
  $| = 1;  # don't let data sit in the output buffer
  for my $m (@m) {
    print "## About to require '$m'\n";
    eval "require $m";
    print "## Warning: $@" if $@;
    ok($m->VERSION >= 1.76,
      sprintf "Found version > 1.76 for %20s: %s",
        $m, $m->VERSION);
  }

Since it's getting stuck after one successful test, my guess is that
it loads one file, but there's something going wrong when it tries to
load the second. Maybe this will tell us an error message, as well as
which file it's getting stuck trying to load.

When you want to run your test script from the command line, you will
need to use some special options, so as to load the new module being
tested and not some old version of the module. I think something like
this is the command to use; remove the '-d' if you don't want to use
the debugger, and change filename.t to the name of your copy of the
test script:

    PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 -d -I'blib/lib' -I'blib/arch'
filename.t

Does this get you any closer to finding the bug?

Cheers!

--Tom Phoenix
Stonehenge Perl Training

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic