Skip Menu |

This queue is for tickets about the PAR CPAN distribution.

Report information
The Basics
Id: 11354
Status: resolved
Priority: 0/
Queue: PAR

People
Owner: smueller [...] cpan.org
Requestors: william [...] knowmad.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.87
  • 0.88
  • 0.89
  • 0.90
  • 0.91
  • 0.92
  • 0.93
  • 0.94
  • 0.941
Fixed in: (no value)

Attachments


Subject: Use of inherited AUTOLOAD for non-method ....
This evening I've experienced an issue with using PAR which caused a loop to occur and continually reprint the following: Use of inherited AUTOLOAD for non-method HTML::FillInForm::DESTROY() is deprecated at /usr/local/lib/perl5/5.8.6/AutoLoader.pm line 116 during global destruction. This error appears to arise because HTML::FIF is a subclass of HTML::Parser which is a subclass of DynaLoader. There is some interaction between this mix which causes the DESTROY method to be loaded. Upon unloading an instance of my HTML::FIF object, I get the infinite looping of the above error. I can use the same toolchain without PAR without an error. I can also add 'no AutoLoader;' to HTML::FillInForm which also fixes the problem. I have tried to recreate the problem without success :(. I'd be glad to try any suggestions to try to repair this error. William
From: william [...] knowwmad.com
Autrijus, I've been able to create a reproducible example using Perl v5.8.6. There are two files in the attached archive (perl5.par which contains HTML::FillInForm and test.par which is described below). I tried to wrap up the example into a PAR loader. However, the code works when called like this: parl perl5.par test.pl Instead, if you unpack the archive and call the script/test.pl directly: perl test.pl You will get the error that I reported earlier. Another way to get rid of the error (besides hacking HTML::FillInForm) is to load another package which uses HTML::FillInForm. You can achieve this with the following code: perl -MPAR=test.par -MTest test.pl I've tried putting Test.pm into the perl5.par and calling the code with the following command: perl -MTest test.pl This also results in the error which seems to indicate that the second call to PAR is necessary to correct the first problem. Also, the following command avoids the error: perl -MHTML::FillInForm test.pl Finally, putting the call to use HTML::FillInForm above the use PAR line in my test script also fixes the problem. So, it seems that if HTML::FillInForm gets loaded by another operation, everything works. Otherwise, if it gets loaded from within a PAR archive, we end up in an infite loop calling AutoLoader::AUTOLOAD. I hope some of this information helps to track down the cause of the problem. William
Download autoload-test.zip
application/x-zip-compressed 40.6k

Message body not shown because it is not plain text.

From: william [...] knowmad.com
I've had another module lock up when used inside a PAR archive with the same error message. This time it was CGI::Session. Using the debugger and a modified version of the test script which I uploaded previously, I was able to track down what I think is at the root of the problem. It turns out that CGI::Session uses autoloader to split out subroutines. Initially I thought the reason for my lock-up in this case was that I did not properly include the auto/ directory when creating my PAR archive file. Using `pp -p testscript.pl`, PAR properly found the autoload files for CGI::Session. However, when I go to use the script with the generated PAR archive, I still got the "use of inherited AUTOLOAD for non-method" errors. Since PAR generates non-standard filenames, when Autoload goes to determine the *.al filename using the path in %INC, it is being handled improperly. Because the $filename value is not being correctly substituted in line 46, the calling file, not the autoload file, is getting required at line 92 in Autoload.pm. Since this succeeds we end up in an infinite loop of trying to autoload the method. A quick fix for any modules which use autoloaded files is to edit them to avoid this usage. This problem also affects the error I originally reported. Because the $filename does not get substituted properly in line 46, Autoload thinks that HTML::FillInForm::DESTORY exists when it does not. If the substitution would have taken place, the $@ would have been set when the bogus file was required. If running without PAR, the file gets undefined which causes a DESTORY subroutine to be automatically added to the calling package namespace. A quick fix is to add `sub DESTROY {}` to the package having the problem. I don't know what the best solution is for making autoload files and files which autoload the DESTROY method play well with PAR. It seems to me that modifications to Autoload.pm are required. William
From: william [...] knowmad.com
Yet another module that does not work inside PAR archives is Time::Piece. It uses DynaLoader which causes the infinite loop of the following error: Use of inherited AUTOLOAD for non-method Time::Piece::_mktime() is deprecated at /usr/share/perl/5.8/AutoLoader.pm line 116. William
On Do. 03. Feb. 2005, 12:56:24, guest wrote: Show quoted text
> Autrijus, > > I've been able to create a reproducible example using Perl v5.8.6. There > are two files in the attached archive (perl5.par which contains > HTML::FillInForm and test.par which is described below). > > I tried to wrap up the example into a PAR loader. However, the code > works when called like this: > > parl perl5.par test.pl > > Instead, if you unpack the archive and call the script/test.pl directly: > > perl test.pl > > You will get the error that I reported earlier. > > Another way to get rid of the error (besides hacking HTML::FillInForm) > is to load another package which uses HTML::FillInForm. You can achieve > this with the following code: > > perl -MPAR=test.par -MTest test.pl > > I've tried putting Test.pm into the perl5.par and calling the code with > the following command: > > perl -MTest test.pl > > This also results in the error which seems to indicate that the second > call to PAR is necessary to correct the first problem. > > Also, the following command avoids the error: > > perl -MHTML::FillInForm test.pl > > Finally, putting the call to use HTML::FillInForm above the use PAR line > in my test script also fixes the problem. > > So, it seems that if HTML::FillInForm gets loaded by another operation, > everything works. Otherwise, if it gets loaded from within a PAR > archive, we end up in an infite loop calling AutoLoader::AUTOLOAD. I > hope some of this information helps to track down the cause of the
problem. Show quoted text
> > > William
Hi William, sorry for the late reply. Perhaps I don't quite understand the problem, but using your test case (with HTML::FillInForm), I can't reproduce the problem as shown below: tsee@tsee64:/tmp/par/tmp$ unzip autoload-test.zip Archive: autoload-test.zip inflating: test.par inflating: perl5.par tsee@tsee64:/tmp/par/tmp$ unzip perl5.par Archive: perl5.par inflating: HTML/FillInForm.pm inflating: script/test.pl inflating: Test.pm tsee@tsee64:/tmp/par/tmp$ perl script/test.pl Going to undef $fif at script/test.pl line 23. Done. tsee@tsee64:/tmp/par/tmp$ rm -rf HTML/ tsee@tsee64:/tmp/par/tmp$ perl script/test.pl Going to undef $fif at script/test.pl line 23. Done. Also, neither CGI::Session nor HTML::FillInForm use Autoloader as far as I can tell! I haven't investigated Time::Piece yet. Steffen
From: WMCKEE [...] cpan.org
On Sun Jul 16 08:28:49 2006, SMUELLER wrote: Show quoted text
> On Do. 03. Feb. 2005, 12:56:24, guest wrote:
> > Autrijus, > > > > I've been able to create a reproducible example using Perl v5.8.6. There > > are two files in the attached archive (perl5.par which contains > > HTML::FillInForm and test.par which is described below). > > > > I tried to wrap up the example into a PAR loader. However, the code > > works when called like this: > > > > parl perl5.par test.pl > > > > Instead, if you unpack the archive and call the script/test.pl directly: > > > > perl test.pl > > > > You will get the error that I reported earlier. > > > > Another way to get rid of the error (besides hacking HTML::FillInForm) > > is to load another package which uses HTML::FillInForm. You can achieve > > this with the following code: > > > > perl -MPAR=test.par -MTest test.pl > > > > I've tried putting Test.pm into the perl5.par and calling the code with > > the following command: > > > > perl -MTest test.pl > > > > This also results in the error which seems to indicate that the second > > call to PAR is necessary to correct the first problem. > > > > Also, the following command avoids the error: > > > > perl -MHTML::FillInForm test.pl > > > > Finally, putting the call to use HTML::FillInForm above the use PAR line > > in my test script also fixes the problem. > > > > So, it seems that if HTML::FillInForm gets loaded by another operation, > > everything works. Otherwise, if it gets loaded from within a PAR > > archive, we end up in an infite loop calling AutoLoader::AUTOLOAD. I > > hope some of this information helps to track down the cause of the
> problem.
> > > > > > William
> > Hi William, > > sorry for the late reply. Perhaps I don't quite understand the problem, > but using your test case (with HTML::FillInForm), I can't reproduce the > problem as shown below: > > tsee@tsee64:/tmp/par/tmp$ unzip autoload-test.zip > Archive: autoload-test.zip > inflating: test.par > inflating: perl5.par > tsee@tsee64:/tmp/par/tmp$ unzip perl5.par > Archive: perl5.par > inflating: HTML/FillInForm.pm > inflating: script/test.pl > inflating: Test.pm > tsee@tsee64:/tmp/par/tmp$ perl script/test.pl > Going to undef $fif at script/test.pl line 23. > > Done. > tsee@tsee64:/tmp/par/tmp$ rm -rf HTML/ > tsee@tsee64:/tmp/par/tmp$ perl script/test.pl > Going to undef $fif at script/test.pl line 23. > > Done. > > > Also, neither CGI::Session nor HTML::FillInForm use Autoloader as far as > I can tell! > > I haven't investigated Time::Piece yet.
Steffen, Sorry for this belated response. It looks like HTML::FillInForm and CGI::Session have stopped using Autoloader. I think the root of the problem was with autoloader which was causing PAR to die. Do you know if recent releases of PAR have addressed this issue? William
Steffen, CGI::Session 3.95 uses Autoloader. I used the autoload-test script with PAR 0.956 and can't replicate the errors I reported earlier. You can close this ticket. Thanks, William
William, thanks for following up on this. Most requestors just don't care any more when their bug is fixed. On Mon Jan 15 09:34:26 2007, WMCKEE wrote: Show quoted text
> Sorry for this belated response. It looks like HTML::FillInForm and > CGI::Session have stopped using Autoloader. I think the root of the > problem was with autoloader which was causing PAR to die. Do you know if > recent releases of PAR have addressed this issue?
Funny you mention this right now. I recently spent the better part of a day to track down this AutoLoader issue. PAR 0.971 comes with a hackish fix for AutoLoader. It might be more trouble that it's worth, though. That's why I'm currently working on a separate release of AutoLoader from the perl core. PAR 0.972 will depend on a recent enough AutoLoader. Best regards, Steffen