On Monday, June 24, 2002, at 11:30 , Theresa Mullin wrote: [..] > use Test; > [..] > > …Here is module Test: > > #!/usr/bin/perl > > ### Program Name: Test.pm > ### Created By: Theresa Mullin > ### Date: 5/20/02 > > package Test; > > $dbase = "TEST"; > print "And to all a good night \n"; > > The code appears to execute, and no error messages are generated. [..]
the code that you wrote fully executed - the problem is that it did exactly what you told it - not what you wanted.... 8-) I think the confusion here is understanding that use FOO; will validate that the 'FOO.pm' can be found and that the code knows what is suppose to be in that Name Space. So in your case you might try phase one of building a pm ### Program Name: Test.pm ### Created By: Theresa Mullin ### Date: 5/20/02 package Test; use strict; sub theTestFunction { my $dbase = "TEST"; print "And to all a good night \n"; return($dbase); } then test that with a simple piece of test code #!/usr/bin/perl -w use strict; use Test; my $gotBack = Test::theTestFunction(); print "Undt we got us: <$gotBack>\n"; other options for looking at the game of getting 'perl libraries' into play are up at: The Simplest case: http://www.wetware.com/drieux/pbl/perlTrick/subStuff/SimpleLib/ Phase One of Playing with h2xs to generate the frameWork for you Perl Module at: http://www.wetware.com/drieux/CS/Proj/PID/ Phase Two of playing with Perl Modules http://www.wetware.com/drieux/CS/Proj/GlobalGame/ Remember - one of the reasons we advocate that you perldoc h2xs and start there is that the code maintenance will be much easier in the long run. this way you can pay the usual fun of perl *.PL PREFIX=~ LIB=~/lib/perl to play around with it.... cf also perldoc perlsub perldoc perlmod perldoc perlmodlib a little practice.... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]