Can't call method <function> on an undefined value at <module>
- From: "richardlsmith" <richardlsmith2@xxxxxxxxx>
- Date: 27 Jun 2005 13:56:59 -0700
I want to reference a variable in a module that was created in the
module consuming program.
----------
The module looks like this:
#! /usr/bin/perl -w
package Module;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(f1);
our $VERSION = 1.00;
sub f1 {
print "$v1\n";
}
1;
----------
The consuming Perl script looks like this:
#! /usr/bin/perl -w
use Module;
$v1 = "v1";
f1();
----------
Any suggestions on how I make this work?
.
- Follow-Ups:
- Re: Can't call method <function> on an undefined value at <module>
- From: John Bokma
- Re: Can't call method <function> on an undefined value at <module>
- From: Gunnar Hjalmarsson
- Re: Can't call method <function> on an undefined value at <module>
- Prev by Date: Re: Win32::Printer::Enum::Printer($server)
- Next by Date: Re: Can't call method <function> on an undefined value at <module>
- Previous by thread: Installing a CPAN Module online
- Next by thread: Re: Can't call method <function> on an undefined value at <module>
- Index(es):