>>>>> "MGS" == Michael G Schwern <[EMAIL PROTECTED]> writes:

  >> who runs one liners with -T?

  MGS> That's the point.  .perlrc would effect all perl, including
  MGS> one-liners.  What's good for big programs is not good for small.

  >> what about making the rc files load only if there is code not in a -e
  >> string? this solves the one liner problem.

  MGS> I thought of this, but the special cases begin to pile up.  First,
  MGS> there's the issue of Perl acting differently from a file as from a
  MGS> command line.  Weird.  Then in the .perlrc there's something things
  MGS> you'll want for one-liners, some for files, some for both.  Sounds
  MGS> like it would make writing the .perlrc files hairy.

well, special cases are perl's middle name. i know we want to lower then
for 6 but this makes some sense. i don't want any preloaded stuff for my
one liners. if i did, i would add the -R (or whatever) option to force
them. as for the special case, it is easy to see the source is from -e
and it won't slow anything down.

  >> i think an environment var might be a good way. if it is set, it is the
  >> file(s) to preload before running your code.

  MGS> The question still remains unanswered.  What do you DO with a
  MGS> .perlrc file??

i wasn't trying to answer that, just come up with a clean way to support
this feature. i don't know of a reason for me to use it but i am sure it
will be used. it can be used for system specific @INC paths without
recompiling perl, enforcing strict/-w/-T on all scripts, etc.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to