I have some code i my global.asa, that conditionally 'requires' files in the
GlobalDir.

This fails miserably after upgrade to the latest version of Apache::ASP (we
were on 2.03 or something real old before).

I suspect that the culprit is the line:
   "no lib qw($self->{global});",

at the end of Apache::ASP::Parse:

    $$script = join(";;", 
                    $strict,
                    "use vars qw(\$".join(" \$",@Apache::ASP::Objects).')',
                    "use lib qw($self->{global});",
                    $$script,
                    "no lib qw($self->{global});",
                    );

Use lib adds the global directory to @INC at compile time, no lib removes it
again [at compile time].

All use's in the script will find files in the globaldir, as will requires
- as long as they are in a BEGIN block! Ifg they are outside a BEGIN block,
then the global dir is absent from @INC - even if it has cartefully been put
there beforehand.

Suggestion:
  remove the 'no lib' line

I can't see that it could have any negative effects - quite contariwise!
This will allow requires to require files in golbaldir as per the
docukmentation.. Otherwise a check should be added to see where globaldir is
in @INC beforehand, and not removing it if it is.

Regards
  Henrik Tougaard, FOA, Denmark.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to