> I just tried to pack the sample script toolbar.pl in
> the Tk::Toolbar distribution on Linux and got the same warning.
> I then packed it with
>
> pp -o toolbar.exe -a "where/ever/your/tkIcons;lib/Tk/ToolBar/tkIcons"
> toolbar.pl
>
> and now it works. I.e. make sure the tkIcons file gets included
> into the PAR (=zip) archive as "lib/Tk/ToolBar/tkIcons". You can
> double check with something like
>
> unzip -l toolbar.exe
>
> Cheers, Roderich
>
Thanks for the hint.
tkIcons is indeed packaged but I have to include unshift @INC,
'C:/Perl/site/lib'; to make the script worked.
The ToolBar.pm uses findINC method to return an absolute path to a file,
here tkIcons.
So I narrowed the problem down to the following script tb.pl
use Tk;
use Tk::ToolBar;
$imageFile = Tk->findINC('ToolBar/tkIcons');
print "imgF: $imageFile\n";
and packaged like this
pp -o tb.exe -a "C:/Perl/site/lib/Tk/ToolBar/tkIcons" tb.pl
This prints imgF:
When I include unshift @INC, 'C:/Perl/site/lib'; in the original script and
package the same way, print returns
imgF: C:/Perl/site/lib/Tk/Toolbar/tkIcons
So something could be wrong with par packaging @INC on windows which does
include the above mentioned path.
Regards Radek H.