Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] Re: libs NOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!

Expand Messages
  • Franki
    The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: syntax error at
    Message 1 of 12 , Nov 14, 2000
    • 0 Attachment
      The specified CGI application misbehaved by not returning a complete set of
      HTTP headers. The headers it did return are:
      syntax error at c:\inetpub\scripts\checkout\Checkout.pl line 3, near "use
      "EnigmaCrypter""
      Execution of c:\inetpub\scripts\checkout\Checkout.pl aborted due to
      compilation errors.


      I tried it with the following.

      #!/usr/bin/perl
      use "EnigmaCrypter";
      use "StringUtilityBelt";
      use Time::Local;
      use "Sender";

      I put the libs in the same folder as the script (and deleted the ones that I
      had copied to the lib folder.) and it came up with the message at the top of
      the screen.

      Have I done something wrong?

      If not, it doesn't work, so I go back to playing with lib.pm and trying to
      figure out how to add the CWD to @INC :(



      Frank Hauptle
      http://www.gshop.com.au/
      franki@...

      -----Original Message-----
      From: webmaster@... [mailto:webmaster@...]
      Sent: Tuesday, 14 November 2000 9:29 PM
      To: perl-beginner@egroups.com
      Subject: [PBML] Re: libs

      --- In perl-beginner@egroups.com, "Franki" <frankieh@v...> wrote:
      >

      > How can I set a script in that folder to the *.pm files located in
      the same
      > directory???


      Try

      use "lib.pm"; # in double-quotes assumes same directory as script.

      =================
      Greg
      BMW Club Webmaster
    • Manolo Marzan
      try changing the PERLLIB EV.
      Message 2 of 12 , Nov 14, 2000
      • 0 Attachment
        try changing the PERLLIB EV.

        Franki (11/14/2000 10:18 PM):
        >The specified CGI application misbehaved by not returning a complete set of
        >HTTP headers. The headers it did return are:
        >syntax error at c:\inetpub\scripts\checkout\Checkout.pl line 3, near "use
        >"EnigmaCrypter""
        >Execution of c:\inetpub\scripts\checkout\Checkout.pl aborted due to
        >compilation errors.
        >
        >
        >I tried it with the following.
        >
        >#!/usr/bin/perl
        >use "EnigmaCrypter";
        >use "StringUtilityBelt";
        >use Time::Local;
        >use "Sender";
        >
        >I put the libs in the same folder as the script (and deleted the ones that I
        >had copied to the lib folder.) and it came up with the message at the top of
        >the screen.
        >
        >Have I done something wrong?
        >
        >If not, it doesn't work, so I go back to playing with lib.pm and trying to
        >figure out how to add the CWD to @INC :(
        >
        >
        >
        >Frank Hauptle
        >http://www.gshop.com.au/
        >franki@...
        >
        >-----Original Message-----
        >From: webmaster@... [mailto:webmaster@...]
        >Sent: Tuesday, 14 November 2000 9:29 PM
        >To: perl-beginner@egroups.com
        >Subject: [PBML] Re: libs
        >
        >--- In perl-beginner@egroups.com, "Franki" <frankieh@v...> wrote:
        >>
        >
        >> How can I set a script in that folder to the *.pm files located in
        >the same
        >> directory???
        >
        >
        >Try
        >
        >use "lib.pm"; # in double-quotes assumes same directory as script.
        >
        >=================
        >Greg
        >BMW Club Webmaster
        >
        >
        >
        >
        >
        >
        >
        >
      • Franki
        Yeah, I realise that, but I am a perl beginner had only a couple of weeks to learn it, so I am not sure how to do it. I just need CWD to be added to @INC,
        Message 3 of 12 , Nov 14, 2000
        • 0 Attachment
          Yeah, I realise that, but I am a "perl beginner" had only a couple of weeks
          to learn it, so I am not sure how to do it.

          I just need CWD to be added to @INC, but have no idea how to make that
          happen.

          I am imagining that I need something like:

          $ENV{'PATH'} .= ':~myid/bin:~myid/cgibin';
          push @INC,'~myid/lib/perl';

          The problem is that I don't want to specify an absolute path as it needs to
          work on Different systems and OS, specifically Linux and NT.
          The rest of the script works on both platforms.
          So I was hoping there was a way to just specify that perl look in the
          Current Working Directory for libs before going through the perl paths to
          look for them.


          Does anyone know how I might do that?



          Frank Hauptle


          -----Original Message-----
          From: Manolo Marzan [mailto:m.marzan@...]
          Sent: Wednesday, 15 November 2000 8:43 AM
          To: perl-beginner@egroups.com
          Subject: Re(2): [PBML] Re: libs NOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!

          try changing the PERLLIB EV.

          Franki (11/14/2000 10:18 PM):
          >The specified CGI application misbehaved by not returning a complete set of
          >HTTP headers. The headers it did return are:
          >syntax error at c:\inetpub\scripts\checkout\Checkout.pl line 3, near "use
          >"EnigmaCrypter""
          >Execution of c:\inetpub\scripts\checkout\Checkout.pl aborted due to
          >compilation errors.
          >
          >
          >I tried it with the following.
          >
          >#!/usr/bin/perl
          >use "EnigmaCrypter";
          >use "StringUtilityBelt";
          >use Time::Local;
          >use "Sender";
          >
          >I put the libs in the same folder as the script (and deleted the ones that
          I
          >had copied to the lib folder.) and it came up with the message at the top
          of
          >the screen.
          >
          >Have I done something wrong?
          >
          >If not, it doesn't work, so I go back to playing with lib.pm and trying to
          >figure out how to add the CWD to @INC :(
          >
          >
          >
          >Frank Hauptle
          >http://www.gshop.com.au/
          >franki@...
          >
          >-----Original Message-----
          >From: webmaster@... [mailto:webmaster@...]
          >Sent: Tuesday, 14 November 2000 9:29 PM
          >To: perl-beginner@egroups.com
          >Subject: [PBML] Re: libs
          >
          >--- In perl-beginner@egroups.com, "Franki" <frankieh@v...> wrote:
          >>
          >
          >> How can I set a script in that folder to the *.pm files located in
          >the same
          >> directory???
          >
          >
          >Try
          >
          >use "lib.pm"; # in double-quotes assumes same directory as script.
          >
          >=================
          >Greg
          >BMW Club Webmaster
          >
          >
          >
          >
          >
          >
          >
          >
        • Mohammed Sameer
          Try using unshift(@INC, . ); at the top of each script file after the #!/usr/bin/perl string ... http://galaxy2k.cjb.net http://www.galaxy.f2s.com ... From:
          Message 4 of 12 , Nov 15, 2000
          • 0 Attachment
            Try using
            unshift(@INC, ".");
            at the top of each script file
            after the #!/usr/bin/perl
            string
             
             
            --------------------------------------
            -----Original Message-----
            From: Franki [mailto:frankieh@...]
            Sent: Wednesday, November 15, 2000 4:09 AM
            To: perl-beginner@egroups.com
            Subject: RE: Re(2): [PBML] Re: libs

            ------------------------------ Tired of Blind Dates? --> Are You Ready to Meet Someone who likes the same things you do? --> Are You Wasting Time in nightspots hoping you meet your soul mate? --> Are You Serious about Finding Someone you can spend time with? LOVE IS JUST A CLICK AWAY http://204.50.152.142/singles IF you've answered YES to just one of these questions, THEN the 1.3 million members of AmericanSingles.com is the online meeting place for YOU! It could change your life forever, like it has for tens of thousands of our members who have fallen in love through our service. IT'S ABSOLUTELY FREE! ------------------------------ Yeah, I realise that, but I am a "perl beginner" had only a couple of weeks
            to learn it, so I am not sure how to do it.

            I just need CWD to be added to @INC, but have no idea how to make that
            happen.

            I am imagining that I need something like:

                $ENV{'PATH'} .= ':~myid/bin:~myid/cgibin';
                push @INC,'~myid/lib/perl';

            The problem is that I don't want to specify an absolute path as it needs to
            work on Different systems and OS, specifically Linux and NT.
            The rest of the script works on both platforms.
            So I was hoping there was a way to just specify that perl look in the
            Current Working Directory for libs before going through the perl paths to
            look for them.


            Does anyone know how I might do that?



            Frank Hauptle


            -----Original Message-----
            From: Manolo Marzan [mailto:m.marzan@...]
            Sent: Wednesday, 15 November 2000 8:43 AM
            To: perl-beginner@egroups.com
            Subject: Re(2): [PBML] Re: libs NOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!

            try changing the PERLLIB EV.

            Franki  (11/14/2000  10:18 PM):
            >The specified CGI application misbehaved by not returning a complete set of
            >HTTP headers. The headers it did return are:
            >syntax error at c:\inetpub\scripts\checkout\Checkout.pl line 3, near "use
            >"EnigmaCrypter""
            >Execution of c:\inetpub\scripts\checkout\Checkout.pl aborted due to
            >compilation errors.
            >
            >
            >I tried it with the following.
            >
            >#!/usr/bin/perl
            >use "EnigmaCrypter";
            >use "StringUtilityBelt";
            >use Time::Local;
            >use "Sender";
            >
            >I put the libs in the same folder as the script (and deleted the ones that
            I
            >had copied to the lib folder.) and it came up with the message at the top
            of
            >the screen.
            >
            >Have I done something wrong?
            >
            >If not, it doesn't work, so I go back to playing with lib.pm and trying to
            >figure out how to add the CWD to @INC  :(
            >
            >
            >
            >Frank Hauptle
            >http://www.gshop.com.au/
            >franki@...
            >
            >-----Original Message-----
            >From: webmaster@... [mailto:webmaster@...]
            >Sent: Tuesday, 14 November 2000 9:29 PM
            >To: perl-beginner@egroups.com
            >Subject: [PBML] Re: libs
            >
            >--- In perl-beginner@egroups.com, "Franki" <frankieh@v...> wrote:
            >>
            >
            >> How can I set a script in that folder to the *.pm files located in
            >the same
            >> directory???
            >
            >
            >Try
            >
            >use "lib.pm"; # in double-quotes assumes same directory as script.
            >
            >=================
            >Greg
            >BMW Club Webmaster
            >
            >
            >
            >
            >
            >
            >
            >





          • Franki
            Thankyou for the suggestion, but alas, it hasn’t worked either, I don’t know what I am doing wrong, It tells me in the headers that it HAS added “.” To
            Message 5 of 12 , Nov 15, 2000
            • 0 Attachment

              Thankyou for the suggestion, but alas, it hasn’t worked either,

               

              I don’t know what I am doing wrong,

               

              It tells me in the headers that it HAS added “.” To the search path, but it still won’t pick up pm files that are in the same dir as the script.

               

              Can anyone tell me why?

               

              I don’t know if it makes a difference, but I am using Win2000 and ActivePerl. Although the script is being created to work on both NT and Linux/Unix systems.

               

              Frank Hauptle

              http://www.gshop.com.au/

              franki@...

               

              -----Original Message-----
              From: Mohammed Sameer [mailto:mohammedeg@...]
              Sent: Wednesday, 15 November 2000 7:14 PM
              To: perl-beginner@egroups.com
              Subject: RE: Re(2): [PBML] Re: libs

               

              Try using

              unshift(@INC, ".");

              at the top of each script file

              after the #!/usr/bin/perl

              string

               

               

              --------------------------------------

              http://galaxy2k.cjb.net

              http://www.galaxy.f2s.com

              -----Original Message-----
              From: Franki [mailto:frankieh@...]
              Sent: Wednesday, November 15, 2000 4:09 AM
              To: perl-beginner@egroups.com
              Subject: RE: Re(2): [PBML] Re: libs

              ------------------------------ Tired of Blind Dates? --> Are You Ready to Meet Someone who likes the same things you do? --> Are You Wasting Time in nightspots hoping you meet your soul mate? --> Are You Serious about Finding Someone you can spend time with? LOVE IS JUST A CLICK AWAY http://204.50.152.142/singles IF you've answered YES to just one of these questions, THEN the 1.3 million members of AmericanSingles.com is the online meeting place for YOU! It could change your life forever, like it has for tens of thousands of our members who have fallen in love through our service. IT'S ABSOLUTELY FREE! ------------------------------ Yeah, I realise that, but I am a "perl beginner" had only a couple of weeks
              to learn it, so I am not sure how to do it.

              I just need CWD to be added to @INC, but have no idea how to make that
              happen.

              I am imagining that I need something like:

                  $ENV{'PATH'} .= ':~myid/bin:~myid/cgibin';
                  push @INC,'~myid/lib/perl';

              The problem is that I don't want to specify an absolute path as it needs to
              work on Different systems and OS, specifically Linux and NT.
              The rest of the script works on both platforms.
              So I was hoping there was a way to just specify that perl look in the
              Current Working Directory for libs before going through the perl paths to
              look for them.


              Does anyone know how I might do that?



              Frank Hauptle


              -----Original Message-----
              From: Manolo Marzan [mailto:m.marzan@...]
              Sent: Wednesday, 15 November 2000 8:43 AM
              To: perl-beginner@egroups.com
              Subject: Re(2): [PBML] Re: libs NOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!

              try changing the PERLLIB EV.

              Franki  (11/14/2000  10:18 PM):

              >The specified CGI application misbehaved by not returning a complete
              set of
              >HTTP headers. The headers it did return are:
              >syntax error at c:\inetpub\scripts\checkout\Checkout.pl line 3, near
              "use
              >"EnigmaCrypter""
              >Execution of c:\inetpub\scripts\checkout\Checkout.pl aborted due to
              >compilation errors.
              >
              >
              >I tried it with the following.
              >
              >#!/usr/bin/perl
              >use "EnigmaCrypter";
              >use "StringUtilityBelt";
              >use Time::Local;
              >use "Sender";
              >
              >I put the libs in the same folder as the script (and deleted the ones
              that
              I
              >had copied to the lib folder.) and it came up with the message at the
              top
              of
              >the screen.
              >
              >Have I done something wrong?
              >
              >If not, it doesn't work, so I go back to playing with lib.pm and trying
              to
              >figure out how to add the CWD to @INC  :(
              >
              >
              >
              >Frank Hauptle
              >http://www.gshop.com.au/
              >franki@...
              >
              >-----Original Message-----
              >From: webmaster@... [mailto:webmaster@...]
              >Sent: Tuesday, 14 November 2000 9:29 PM
              >To: perl-beginner@egroups.com
              >Subject: [PBML] Re: libs
              >
              >--- In perl-beginner@egroups.com, "Franki"
              <frankieh@v...> wrote:
              >>
              >
              >> How can I set a script in that folder to the *.pm files located in
              >the same
              >> directory???
              >
              >
              >Try
              >
              >use "lib.pm"; # in double-quotes assumes same directory as
              script.
              >
              >=================
              >Greg
              >BMW Club Webmaster
              >
              >
              >
              >
              >
              >
              >
              >







            • Tom Barron
              Franki wrote ... Well, take into account that . is the current working directory, not necessarily the directory where the script lives. If I do, for example:
              Message 6 of 12 , Nov 15, 2000
              • 0 Attachment
                Franki wrote
                > ...
                > It tells me in the headers that it HAS added "." To the search path, but it still won't pick up pm files that are in the
                > same dir as the script.
                >
                > Can anyone tell me why?

                Well, take into account that "." is the current working directory, not
                necessarily the directory where the script lives. If I do, for example:

                $ cd /my/script/dir
                $ ls
                myscript
                $ cd /somewhere/else
                $ /my/script/dir/myscript

                while myscript is running, "." is NOT /my/script/dir, but
                /somewhere/else. If I have libs in /my/script/dir in this case, adding
                "." to @INC won't help perl find them, but adding /my/script/dir would.

                tb
              • Gerrit P. Haase
                ... Maybe you should additionally use this Module: FindBin -
                Message 7 of 12 , Nov 19, 2000
                • 0 Attachment
                  <15 Nov 2000, 10:09 Uhr wars, als Franki folgendes schrub:>
                  < RE: Re(2): [PBML] Re: libs >

                  > The problem is that I don't want to specify an absolute path as it needs to
                  > work on Different systems and OS, specifically Linux and NT.
                  > The rest of the script works on both platforms.

                  Maybe you should additionally use this Module:

                  FindBin - optional module which deals with paths relative to the source file.

                  $ man FindBin

                  FindBin(3) Perl Programmers Reference Guide FindBin(3)

                  NAME
                  FindBin - Locate directory of original perl script

                  SYNOPSIS
                  use FindBin;
                  use lib "$FindBin::Bin/../lib";

                  or

                  use FindBin qw($Bin);
                  use lib "$Bin/../lib";

                  DESCRIPTION
                  Locates the full path to the script bin directory to allow
                  the use of paths relative to the bin directory.

                  This allows a user to setup a directory tree for some
                  software with directories <root>/bin and <root>/lib and
                  then the above example will allow the use of modules in
                  the lib directory without knowing where the software tree
                  is installed.

                  If perl is invoked using the -e option or the perl script
                  is read from "STDIN" then FindBin sets both "$Bin" and
                  "$RealBin" to the current directory.

                  EXPORTABLE VARIABLES
                  $Bin - path to bin directory from where script was invoked
                  $Script - basename of script from which perl was invoked
                  $RealBin - $Bin with all links resolved
                  $RealScript - $Script with all links resolved

                  KNOWN BUGS
                  if perl is invoked as

                  perl filename

                  and filename does not have executable rights and a program
                  called filename exists in the users "$ENV{PATH}" which
                  satisfies both -x and -T then FindBin assumes that it was
                  invoked via the "$ENV{PATH}".

                  Workaround is to invoke perl as

                  perl ./filename

                  AUTHORS
                  FindBin is supported as part of the core perl distribu-
                  tion. Please send bug reports to <perlbug@...> using
                  the perlbug program included with perl.

                  Graham Barr <gbarr@...> Nick Ing-Simmons
                  <nik@...>

                  COPYRIGHT
                  Copyright (c) 1995 Graham Barr & Nick Ing-Simmons. All
                  rights reserved. This program is free software; you can
                  redistribute it and/or modify it under the same terms as
                  Perl itself.

                  2000-10-22 perl v5.7.0 1




                  - gph -

                  --
                  Gerrit Peter Haase
                  ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤
                Your message has been successfully submitted and would be delivered to recipients shortly.