Comments on this suggestion

From: B McKee (binlinux_at_hotmail.com)
Date: 04/27/04


Date: Tue, 27 Apr 2004 11:00:57 -0400
To: beginners@perl.org

I tripped over this chunk of code today -

> #!/usr/bin/perl -w
>
> BEGIN {
> use File::Basename;
> unshift @INC, dirname($0);
> }
> use strict;
> use module_whatever;
> ...

if I'm reading this right it would let
you include a required module your users
may or may not have with your own script.
No installation required.

Is there a drawback to this approach?

Brian



Relevant Pages

  • Re: html template and tables
    ... use warnings; ... is generally useless and confusing to people reading your code). ... template section ... error under the strict pragma. ...
    (perl.beginners)
  • Deleting repeated lines (continued).
    ... use strict; ... or die "Can't open file for reading: ...
    (perl.beginners)
  • RE: question related to readdir function
    ... perl is not splitting your file name into ... different strings. ... It is just reading all the file names in that directory. ... > use strict; ...
    (perl.beginners)
  • Re: Parsing form POST without CGI.pm on Win32
    ... Using your code (or any other code I got from books, ... deal with the STDIN all produce the same. ... Your code died "Reading of posted data failed." ... use strict; ...
    (comp.lang.perl.misc)
  • Re: Dear Matlab guru & experts - large data suggestion
    ... fgetl" command because it's going take a very long time to just ... You read it chunk by chunk. ... Windows OS with 1 GB or RAM, you could read in on the ... detection method requires reading data continously. ...
    (comp.soft-sys.matlab)