On Thu, 30 Sep 2004 [EMAIL PROTECTED] wrote:

> I am unsure if I pissed everyone off, b/c no one responded??? 

Some (all?) of us have jobs and lives that occasionally prevent us from 
giving out free advice to strangers on the internet immediately.

It happens.

It isn't meant personally.

> I am reading Object Oriented Perl pages 52 and 53 for setting up a 
> module. It is telling me in order to use a routine from a different 
> file you have to
> 
> 1) choose a lib directory
> 2) export PERL5LIB=.../.../.../
>     use lib /usr/local/perl/my.pl
> 3) created nested subdirs for each component of the module name
> 4) create a text file in the last directory
> 5) Insert you code.
> 6) add 1; at then end of the perl program file.
> 
> 
> NOTE:  is says in the footer that I can use h2xs to combine steps 3 and 4. 
>  
> 
> My quesiton is can't I just use step 2 and then in my program where I want 
> to use this code, make a routine call?

What, and omit the other steps? Are they really that onerous? 

If you choose to put your module somewhere in the current @INC, then 
steps 1 & 2 are taken care of, steps 3 & 4 are simply

  cd /usr/local/lib/perl
  mkdir -p Path/For/My/Deepest/Sub/Module
  echo "1;" > Path/For/My/Deepest/Sub/Module/stub.txt

and then just write your code. 

Does this answer the question? I'm not clear what you're confused about.

> I then looked into Perl Cookbook ch 12_02 and it discussed :
> 
> [....]
> 
> Is one autoloader and self loader?  It seems to me I am getting 
> conflicting info of just that I am not understanding?

_Perl Cookbook_ is giving you the cookbook answer, suitable for cutting, 
pasting, and editing as needed.

On the other hand, _Object Oriented Perl_ is trying to teach you to 
understand how OO *works* in Perl, including what steps are mandatory 
and which are optional and how different aspects can be implemented.

Once you've digested Conway's book -- and you should finish with it, 
it's excellent -- then the section of the Cookbook should be clearer.

 

-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to