Re: packages and variables

2004-03-04 Thread R. Joseph Newton
Ralf Schaa wrote: > Cheers all, > > i am doing my first steps with writing packages/modules and of course > there are problems: > > the module holds a variable in a subroutine. this variable i like to > pass to the callerprogram, Dont. Just don't. Use good design in your program instead. Good

RE: packages and variables

2004-03-04 Thread EUROSPACE SZARINDAR
Hi Ralf, TMHO, you should create the $test before printing it. In fact, change print "1: $testThis::test\n"; into testMod::testThis(); and afterwards, the $test will be available. OR: having $test global is not so profitable because you want be able to have your pe

Re: packages and variables

2004-03-04 Thread zsdc
Ralf Schaa wrote: the module 'testMod.pm'' #== package testMod; use strict; use Exporter; our @ISA = ("Exporter"); our @EXPORT= qw($test &testThis); our @EXPORT_OK = qw($test &testThis); sub testThis{ our $test = "test";} 1; the caller-program 'test.pl' #=