use ownmodule; my $result = ownmodule::GetResult($query);If by calling that sub routine in the ownmodule.pm I call another subroutine in the same module. I get an error.
Without seeing the code in ownmodule.pm and the error message, it's hard to tell. Incidentally all lowecase modules are reserved for pragmas, so even for an experiment you should use e.g. Ownmodule.
$ cat Ownmodule.pm
# -*- Perl -*-
use strict;
use warnings;
package Ownmodule;
use base 'Exporter';
our @EXPORT=qw/first/;
sub first {
print " called\n";
second();
}
sub second {
print " called\n";
}
1;
__END__
$ perl -MOwnmodule -e first
called
called
perlmonks.org content © perlmonks.org and Anonymous Monk, blazar, cdarke
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03