Greetings. Attached is a patch that fixes the misassumption that
$INC{"$pkg.pm"} will always contain the pathname, which is not the case
under [EMAIL PROTECTED] schemes like PAR.pm or only.pm.
Without this patch, Tk-based applications fails to autoload, even
if the requires .al files are present in the PAR file. (Thanks to
H. Wade Minter and Bruce Winter that brought this to my attention.)
Currently this patch will be auto-applied by PAR's 'pp' to Tk::Widget,
but I think it belongs to Tk itself rather than a kludgy hack here.
Thanks,
/Autrijus/
--- /usr/local/lib/perl5/site_perl/5.8.0/mach/Tk/Widget.pm Sun Mar 16 05:20:02
2003
+++ lib/Tk/Widget.pm Mon Mar 17 01:19:42 2003
@@ -277,11 +277,8 @@
my ($pkg,$func) = $what =~ /(.*)::([^:]+)$/;
confess("Attempt to load '$what'") unless defined($pkg) && $func =~ /^[\w:]+$/;
$pkg =~ s#::#/#g;
- if (defined($name=$INC{"$pkg.pm"}))
- {
- $name =~ s#^(.*)$pkg\.pm$#$1auto/$pkg/$func.al#;
- }
- else
+ unless (defined($name=$INC{"$pkg.pm"}) and
+ $name =~ s#^(.*)$pkg\.pm$#$1auto/$pkg/$func.al#)
{
$name = "auto/$what.al";
$name =~ s#::#/#g;
pgp00000.pgp
Description: PGP signature
