in reply to OOP question
But if you are trying to define functions in one package and access in another without creating objects, then OO is probably not how you want to do it. Instead look into Exporter to export the functions to the package they are used in. The basic template for a procedural module that I use looks like this:
Then when you pull it in do a use and pass the list of things you want to import:package Demo; use Exporter; @ISA = 'Exporter'; @EXPORT_OK = qw(list @things %that can $be exported); use strict; use vars ($whatever %needed @variables); # Nifty stuff here 1;
use Demo qw(list @things);
|
|---|