what is wrong with this module!?

I am just trying to make a simple Perl module to see if I can get one to work, and I can't seem to - perhaps it has something to do with my Perl install: I have latest ActivePerl for Windows (using Windows 98).

Filetest.pm looks like:
#
package Filetest;

require Exporter;


@ISA = qw(Exporter);
@EXPORT = qw(mytestsub);
@EXPORT_OK = qw();


sub mytestsub {
my $aa = $_[0] * 2;
my $bb = $_[1] * 2;
my $cc = $_[2] * 2;

return ($aa,$bb,$cc);
}

1;
#

Anyone see what is wrong? It seems to import OK using a 'use Filetest;', but then my script acts like it has no idea that mytestsub has been defined. BTW, every standard module that I try to use (e.g., Cwd, strict) seems to work.

ThanksOK, I figured out the problem - it was my choice of name for the module. Turns out there is already a "filetest.pm" in the perl/lib/ folder - it is part of the standard Perl distribution. By simply renaming my module (i.e., its filename and its 'package' name), it magically worked.

Oh well, maybe my mistake can help someone else browsing this forum :)
 
Top