Actually if you are taking small steps toward an OO module then you have too much stuff in your module. You can trim it to just:
use strict; use warnings; package Foo; sub bar { print "Hello \n"; } 1;
With the driver script you showed and Foo.pm in the same directory that will print "Hello" as expected. That's it. Nothing more is required. If you copy Foo.pm to your Perl's site/lib folder it will still work and now you can use Foo.pm from anywhere.
Unless you are preparing a module for CPAN, there need be nothing more to making your library available than that.
In reply to Re: making a library
by GrandFather
in thread making a library
by adieu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |