[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] where to put subroutines [was Dumb newbie question]



At 9:24 AM -0700 4/11/99, Jeffrey Hull wrote:
>Stupid of me.  I am trying to use some subroutines and can't figure out
>where to put them to allow MacPerl to find them - get Undefined Subroutine
>error mssg.

By running a short script:

foreach $inc (@INC) {
  print "$inc\n";
}

you can get a list of the places MacPerl will _look_ for included files,
by default (you can add items to the array @INC), but you will still
have to "require" or "use" the files, as appropriate.

If you are only using the subroutines in a single project, you may just
want to keep them in the main file or in a file in the same directory.

-r

P.S. to all...  Please try to use descriptive subject lines.
--
Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm
Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
MacPerl: http://www.ptf.com/macperl,   http://www.ptf.com/ptf/products/MPPE
MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org