Re: FWD: Converting libwww to Win95
Martin Cleaver (Martin.Cleaver@bcs.org.uk)
Sat, 13 Jul 1996 12:24:28 +0800
Stan, thanks for your letter. I have copied it to libwww-perl
so that others may benefit.
Maybe Gisle would be kind enough to comment on why we get
the subroutine redefined warnings.
Stan Shapiro wrote in a mail to me:
>
> >Martin RJ Cleaver (HK x2012) +852 847 2012 wrote (from work):
> [unsnip - MRJC!]
Stan asked me where to get my patch for libwww-perl so that it works
on perl 5.001 and Win32 machines.
> >Sure, [the patch program] can be found at the libwww-perl home page:
> > http://www.sn.no/libwww-perl/
> >I am attempting to release some changes to make FTP urls work as
> >well, but this depends on how well installing my modem s/w goes
> >on my ThinkPad with NT 4.0b2. I'll be sure to announce the
> >changes on the libwww-perl mailing list (see
> >http://www.ics.uci.edu/pub/websoft/libwww-perl/archive/) when
> >I eventually get it working.
>
> Martin,
> Thanks very much for the pointer and the script.
> Success! --- er I think.
> When I run 'perl lwp-rget.pl --version' there are a few
> warnings wrt subs being redefined. Is this just a
> side-effect of bringing the stuff down to 5.001
> format?
Yup. I assume the messages are as follows:
Subroutine is_info redefined at
C:/win32app/perl-extra-libs/prod/standard/HTTP/Response.pm line 175.
Subroutine is_success redefined at
C:/win32app/perl-extra-libs/prod/standard/HTTP/Response.pm line 176.
Subroutine is_redirect redefined at
C:/win32app/perl-extra-libs/prod/standard/HTTP/Response.pm line 177.
Subroutine is_error redefined at
C:/win32app/perl-extra-libs/prod/standard/HTTP/Response.pm line 178.
This may be a difference between perl 5.001 and perl 5.002 or maybe
I messed up in my conversion script. I should try converting my
script on a UNIX box and seeing whether I get the same errors.
Use of uninitialized value at
C:/win32app/perl-extra-libs/prod/standard/LWP/MediaTypes.pm line 48.
Use of uninitialized value at
C:/win32app/perl-extra-libs/prod/standard/LWP/MediaTypes.pm line 48.
This is because $HOME isn't set on Win32 machines. I think that
LWP shouldn't complain.
> I haven't gone any further than this at the moment-
>
> Had an interesting time with lwpwin32.pl.
> It wasn't the script's fault. It was mine.
> After carefully reading the docs I carefully forgot to fix
> autosplit and Autoloader. So I re-installed libwww and started
> again.
> So did the fun.
>
> Autosplit uses File::Path::mkpath and same has a buglet
> on Win95, at least.
> line 113: next if -d "@p/"; # $" = '/' and @p is path components
> needs to be: next if -d "@p";
> or perl/win95 doesn't recognise an existing directory,
> tries to make the dir, and bails out 'can't make dir'
>
> Having eventually figured this out - and having about n^n bits
> of LWP and my perl libarary scattered about. I reinstalled both
> ,ran lwpwin32.pl, then lwp-rget.pl --version. That's when I found out
> that Getopt::Long as shipped w w32perl 108, doesn't recognise
> the option syntax used in lwp-rget.pl. So I got the latest v long.pm,
> copied/hacked lwpwin32.pl just to process that and here I am.
> Well nearly -
>
> C:\perl\NTPERL\PERL5\bin>perl lwp-rget.pl --version
> Use of uninitialized value at C:\perl\NTPERL\PERL5\lib/Getopt/Long.pm line 485.
> Oh oh!
> Turned out to be simple enough.
>
> - $VERSION is hardcoded in long.pm that I fetched [getoptslong23].
> lwpwin32 then resets it to undef via
> $Getopt::Long::VERSION = undef; # Used at least twice
>
> All of it trivial enough, I guess. But I gotta admit that libwwww
> intimidates me - and not a little.
Just use it a bit at a time. I don't know what most of it does.
> Thanks once again, without lwpwin32.pl I couldn't have even
> started.
> Hope I haven't taken too much of your time.
Not at all, thanks for your report. I had forgotten about the
File::Path::mkpath problem. The perl-win32@perl.hip.com seems
to be a real waster.
> Best Wishes
> Stan Shapiro
>
> >"Communicate your fears - it transcends your conscience"
> Yup! It makes sense - but I'm scared to:-)
Often those things that we are most scared of are those which are
fundementally the most urgent...
-----------------------------------------------------------------------------
> "Time's fun when you're having flies." -- Kermit the Frog
> Email<netset@easynet.co.uk> Voice: +44 (0)171 916 5157
> netset URL: http://www.netset.co.uk/
> -----------------------------------------------------------------------------
--
Martin.Cleaver@bcs.org.uk
"Communicate your fears - it transcends your conscience"