in reply to Re^4: Compile errors
in thread Compile errors

Hmm ,

The compile error is, I'm afraid, a cut & paste error on your part - you omitted the closing single quote :-(

Are you sure the head of C:/Perl/lib/Win32.pm contains 2 package statements ?

How do you load Win32 i.e. via use or require ... and what's the statement you use ?

A user level that continues to overstate my experience :-))

Replies are listed 'Best First'.
Re^6: Compile errors
by Albert059 (Initiate) on Sep 27, 2009 at 02:40 UTC

    Oops. Duh!

    Ok, typing perl -MWin32 -e "die $Win32::VERSION" gives 0.39 at -e line 1.

    Cut and paste error: Beginning of C:/Perl/lib/Win32.pm actually reads:

    package Win32; BEGIN { use strict; use vars qw|$VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK|; require Exporter; require DynaLoader; #<---- LINE 8 @ISA = qw|Exporter DynaLoader|; $VERSION = '0.39'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION;

    Context of perl5db.pl:

    sub ExpandFileName { my $filename = shift; if ($filename =~ m/^\(/) { return $filename; } else { my $result = Win32::GetFullPathName($filename); #<----LINE 435 return NormalizeFileName($result); } }

    Sorry about that. I'm brand new to Perl Monks and I've been having a little trouble using this forum. For instance, right now I can't see all the comments on this thread. After the first three, I just see titles.

    No, wait. I changed my "chosen depth" and now I can see all the comments.

      Hmmm ,

      I recall having seen a not dissimilar problem a while ago whilst on a client site - in attempting to narrow the problem down to the smallest subset of code in which the problem manifested itself, much to my consternation, the problem disappeared.

      AFAIR, further experimentation led to the conclusion that the problem was down to the incestuous/circular inclusion of, sometimes ,not too well written bespoke/custom libraries.

      Question is, have you attempted anything similar ... with either a) similar or b) different results ?

      If it's the latter, could you let us have a look at the minimal code that demonstrates the problem.

      BTW, what happens/do you see when/if you attempt to compile your script from the command line i.e. can we rule out/focus on any influence that the IDE may be exerting ?

      Update:

      Added afterthought.

      A user level that continues to overstate my experience :-))
      Hmmm ,

      I recall having seen a not dissimilar problem a while ago whilst on a client site - in attempting to narrow the problem down to the smallest subset of code in which the problem manifested itself, much to my consternation, the problem disappeared.

      AFAIR, further experimentation led to the conclusion that the problem was down to the incestuous/circular inclusion of, sometimes ,not too well written bespoke/custom libraries.

      Question is, have you attempted anything similar ... with either a) similar or b) different results ?

      If it's the latter, could you let us have a look at the minimal code that demonstrates the problem.

      A user level that continues to overstate my experience :-))