[tpm] Perl modules

Uri Guttman uri at StemSystems.com
Sat Jan 16 12:05:47 PST 2010


>>>>> "a" == arocker  <arocker at vex.net> writes:

  a> new name.  Consequently, Perl found the file, but didn't name the
  a> subroutines appropriately.
  >> 
  >> the usual mismatch of file/path name and package name.
  >> 
  >> uri

  a> It should be possible to write an automatic checker/corrector for that.
  a> I'll have to think about it.

think hard for several reasons. you can have multiple package names in
one file (only one with the matching path name will have its import
method called by use) and multiple files can have the same package
name. if your code is pure OO then no import() need to be called and
that works with multiple classes in the same file. usually these are
very related or helper classes. with multiple files with the same class
name, again, it should be pure OO or with no importing needed. this is
done when you have larger amounts of code in the same class and use
multiple files to organize it better. i have used both multi's in the
same system for the correct reasons but it was all pure OO so it works well.

uri

-- 
Uri Guttman  ------  uri at stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


More information about the toronto-pm mailing list