----- Original Message -----
From: "simon andrews (BI)"
>
> I tried that, but AddScrollbars.pm doesn't exist and > must appear from
some Perl magic somwhere!
>
It comes about from this sub in Widget.pm:
sub _AutoloadTkWidget
{
my ($self,$method) = @_;
my $what = "Tk::Widget::$method";
unless (defined &$what)
{
require "Tk/$method.pm";
}
return $what;
}
If $method contains 'AddScrollbars', then, since 'Tk::Widget::AddScrollbars'
is not defined, it goes looking for Tk/AddScrollbars.pm.
When I run the perl script (which works fine) I find that $method at no
stage contains 'AddScrollbars' - or, if it does contain that value, then sub
_AutoloadTkWidget does not get called.
It's only when I convert my script into an executable with pp that the sub
is called with $method containing 'AddScrollbars'. I don't know at this
stage what accounts for that difference in behaviour.
I originally assumed that pp did not handle autoloading, but I've since
created a simple test module and script that demonstrates that pp handles
autoloading perfectly well.
So ..... why the problem with Tk ?
Cheers,
Rob