I'm still somewhat confused. If the problem is due to the fact that the filename and the package name don't match, then why does the following not also give an error, given that I'm loading Foo the same (incorrect) way:
#!/tool/bin/perl -w use strict; use lib '/home/user/perl_modules/lib/perl5'; use My::Foo; my $new_foo = Foo->new();
I thought that generally speaking, whatever prefixed the :: of a module name (e.g. Foo) was used to denote directories that the module's file (Foo.pm) was within, relative to whatever was in my @INC. In my example above, the /home/user/perl_modules/lib/perl5 folder contains the 'My' folder containing my own personal modules (such as Foo.pm), but it also contains all of the folders of modules I downloaded from CPAN (it's a local perl installation), e.g.:
/home/user/perl_modules/lib/perl5 My/ CGI/ Devel/ Pod/ ...
and so on. Are you saying that instead of what I did above, I should instead do the following:
use lib '/home/user/perl_modules/lib/perl5'; use lib '/home/user/perl_modules/lib/perl5/My'; use Foo;
Or am I misunderstanding?
In reply to Re^2: help with versioning modules
by Special_K
in thread help with versioning modules
by Special_K
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |