Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undifined Value

Status
Not open for further replies.

Aradon

Programmer
Jun 9, 2005
18
US
I'm presently trying to install Scalar::Util through CPAN as well as manually and I continue to get the same error

Code:
Running [/usr/bin/perl Makefile.PL ]...
Can't call method "load" on an undefined value at inc/Module/Install.pm - /Users/gbarr/Library/Perl/Module/Install.pm line 214.
[ERROR] Could not run '/usr/bin/perl Makefile.PL': Can't call method "load" on an undefined value at inc/Module/Install.pm - /Users/gbarr/Library/Perl/Module/Install.pm line 214.
I've tried to do it manually and through cpan but both produce the same results. Any Help would be apprciated.
 
What does line 214 say? Load what?
--Paul

cigless ...
 
I THINK this is the line. I found an install.pm in the inc/module (which is where it is listed and here is what it said under the #line 210 part:
Code:
sub call {
    my $self   = shift;
    my $method = shift;
    my $obj = $self->load($method) or return;

    unshift @_, $obj;
    goto &{$obj->can($method)};
}

The sub load does exist in the file as line 225 but it sounds like $method is undefined for some reason. I'm not sure, any ideas?
 
Looks as if something's not there to be loaded, or maybe it's there but corrupted?

Mike

You cannot really appreciate Dilbert unless you've read it in the
original Klingon.

Want great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Well what I've done for a quick fix as of right now is changed the Module itself. It's only trying to reduce the number of references and since I'm not concerned about space presently I'm not worried about it. However it brings up another msg everytime that states

"Useless use of hash element in void context at /usr/perl5/site_perl/5.005//Net/SSH/Perl/Packet.pm line 28"

Which code now looks like this:
Code:
#use Scalar::Util qw(weaken);

sub new {
    my $class = shift;
    my $ssh   = shift;
    my $pack  = bless { ssh => $ssh, @_ }, $class;
    $pack->{ssh};
    unless ($pack->{data}) {
        $pack->{data} = Net::SSH::Perl::Buffer->new(
            MP => $ssh->protocol == PROTOCOL_SSH2 ? 'SSH2' : 'SSH1');
        if ($pack->{type}) {
            $pack->{data}->put_int8($pack->{type});
        }
    }
    $pack;
}

So it's complaining about the pack obviously. This isn't something I can really take out so I'll just have to either catch it or ignore it for now.

But I'm not sure what it could be that's not there or corupted. :(

Btw, my new problem is I don't have avr-gcc. Anyone have a download link for it. I might have to update my gcc but I'm not quiet sure how to complete that. Perl updating was easy, CPAN :X
 
Well it was going so well until I actually tried to install the SSH modules.

I now HAVE to have this utility that they are asking for and unfortiontly I get the same error over and over again. I could really use some help on this.

Line 214 is the same as the thing at the top and I'm unsure of how to go about this, the exact module I'm installing is Crypt::DH


once again:
Code:
perl Makefile.PL 
*** ExtUtils::AutoInstall version 0.56
*** Checking for dependencies...
[Core Features]
- Math::BigInt ...loaded. (1.77 >= 1.60)
*** ExtUtils::AutoInstall configuration finished.
Can't call method "load" on an undefined value at inc/Module/Install.pm - /Library/Perl/5.8.1/Module/Install.pm line 214.

With the code:
Code:
sub call {
    my $self   = shift;
    my $method = shift;
    my $obj = $self->load($method) or return;

    unshift @_, $obj;
    goto &{$obj->can($method)};
}

sub load {
    my ($self, $method) = @_;

    $self->load_extensions(
        "$self->{prefix}/$self->{path}", $self
    ) unless $self->{extensions};

    foreach my $obj (@{$self->{extensions}}) {
        return $obj if $obj->can($method);
    }

    my $admin = $self->{admin} or die << "END";
The '$method' method does not exist in the '$self->{prefix}' path!
Please remove the '$self->{prefix}' directory and run $0 again to load it.
END

    my $obj = $admin->load($method, 1);
    push @{$self->{extensions}}, $obj;

    $obj;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top