Skip Menu |

This queue is for tickets about the Module-ScanDeps CPAN distribution.

Report information
The Basics
Id: 56020
Status: resolved
Priority: 0/
Queue: Module-ScanDeps

People
Owner: Nobody in particular
Requestors: DJIBEL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.96
Fixed in: (no value)



Subject: PAR::Packer and PDF::API2 Unicode::UCD: failed to find UnicodeData.txt
Dear, I have this script which use PDF::API2 (0.73) : #!/usr/bin/perl use strict; use warnings; use PDF::API2; pp -o test.exe test.pl The packaging is ok, but when i execute this test.exe I have this error message : Unicode::UCD: failed to find UnicodeData.txt in CODE(0x2c84f7c) C:\Users\user\AppData\Local\Temp\par-user\cache-7cb6bafd0 5de0244ffffca19c561d6fbaa5f768c\inc\lib C:\Users\user\AppData\Local\Temp\par-user\cache-7cb6bafd05de0244ffffca19c561d6fba a5f768c\inc CODE(0x2a8d0b4) CODE(0x2a8d3b4) at PDF/API2/Resource/Font/BdFont.pm line 45 Compilation failed in require at PDF/API2/Resource/Font/BdFont.pm line 45. BEGIN failed--compilation aborted at PDF/API2/Resource/Font/BdFont.pm line 45. Compilation failed in require at PDF/API2.pm line 67. BEGIN failed--compilation aborted at PDF/API2.pm line 67. Compilation failed in require at script/pdfpar.pl line 5. BEGIN failed--compilation aborted at script/pdfpar.pl line 5. In my computer, I don't have this file UnicodeData.txt. Best Regards, Djibril
On Sun Mar 28 08:43:12 2010, DJIBEL wrote: Show quoted text
> Unicode::UCD: failed to find UnicodeData.txt in CODE(0x2c84f7c) > C:\Users\user\AppData\Local\Temp\par-user\cache-7cb6bafd0 > 5de0244ffffca19c561d6fbaa5f768c\inc\lib > C:\Users\user\AppData\Local\Temp\par-user\cache- > 7cb6bafd05de0244ffffca19c561d6fba > a5f768c\inc CODE(0x2a8d0b4) CODE(0x2a8d3b4)
Yikes, another one of those modules that scatters its data files over the installation. I wonder why this hasn't come up earlier, since Unicode::UCD is in Perl core since 5.7.3. Anyway, its search strategy for a data file with path @path is for my $d (@INC) { use File::Spec; $f = File::Spec->catfile($d, "unicore", @path); last if open($$rfh, $f); } (and all data files seem to have the suffix .txt). The attached patch fo Module::ScanDeps should do the trick.
Subject: 56020.patch
--- lib/Module/ScanDeps.pm~ 2009-09-16 11:06:56.000000000 +0200 +++ lib/Module/ScanDeps.pm 2010-03-28 19:34:06.000000000 +0200 @@ -397,6 +397,9 @@ 'Tk/FBox.pm' => [qw( Tk/folder.xpm Tk/file.xpm )], 'Tk/Getopt.pm' => [qw( Tk/openfolder.xpm Tk/win.xbm )], 'Tk/Toplevel.pm' => [qw( Tk/Wm.pm )], + 'Unicode/UCD.pm' => sub { + grep /\.txt$/, map "unicore/$_->{name}", _glob_in_inc('unicore', 0); + }, 'URI.pm' => sub { grep !/.\b[_A-Z]/, _glob_in_inc('URI', 1); },
Le Dim 28 Mar 2010 13:38:10, RSCHUPP a écrit : Show quoted text
> On Sun Mar 28 08:43:12 2010, DJIBEL wrote:
> > Unicode::UCD: failed to find UnicodeData.txt in CODE(0x2c84f7c) > > C:\Users\user\AppData\Local\Temp\par-user\cache-7cb6bafd0 > > 5de0244ffffca19c561d6fbaa5f768c\inc\lib > > C:\Users\user\AppData\Local\Temp\par-user\cache- > > 7cb6bafd05de0244ffffca19c561d6fba > > a5f768c\inc CODE(0x2a8d0b4) CODE(0x2a8d3b4)
> > Yikes, another one of those modules that scatters its data files > over the installation. I wonder why this hasn't come up earlier, > since Unicode::UCD is in Perl core since 5.7.3. Anyway, its > search strategy for a data file with path @path is > > for my $d (@INC) { > use File::Spec; > $f = File::Spec->catfile($d, "unicore", @path); > last if open($$rfh, $f); > } > > (and all data files seem to have the suffix .txt). The attached > patch fo Module::ScanDeps should do the trick.
Dear, Thank you for your patch. Now I have this error message when I execute my test.exe : Can't locate PerlIO.pm in @INC (@INC contains: C:\Users\beline\AppData\Local\Temp\par-beline\cache-31b4270c10dbd27682a5add65c 2321943bd7f61d\inc\lib C:\Users\beline\AppData\Local\Temp\par-beline\cache-31b4270c10dbd27682a5add65c2321943bd7f61d\inc CODE( 0x28cdbec) CODE(0x28cdeec)) at PDF/API2.pm line 212. BEGIN failed--compilation aborted. Best regards, djibril
I am using ActivePerl 5.10 build 1007 perl -v This is perl, v5.10.1 built for MSWin32-x86-multi-thread (with 2 registered patches, see perl -V for more detail) Copyright 1987-2009, Larry Wall Binary build 1007 [291969] provided by ActiveState http://www.ActiveState.com Built Jan 26 2010 23:15:11 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Subject: Re: [rt.cpan.org #56020] PAR::Packer and PDF::API2 Unicode::UCD: failed to find UnicodeData.txt
Date: Mon, 29 Mar 2010 16:10:01 +0200
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Roderich Schupp <roderich.schupp [...] googlemail.com>
On Sun, Mar 28, 2010 at 11:42 PM, Djibril Ousmanou via RT <bug-Module-ScanDeps@rt.cpan.org> wrote: Show quoted text
> Thank you for your patch. Now I have this error message when I execute > my test.exe : > > Can't locate PerlIO.pm in @INC (@INC contains: > C:\Users\beline\AppData\Local\Temp\par-beline\cache-31b4270c10dbd27682a5add65c > 2321943bd7f61d\inc\lib > C:\Users\beline\AppData\Local\Temp\par-beline\cache-31b4270c10dbd27682a5add65c2321943bd7f61d\inc > CODE( > 0x28cdbec) CODE(0x28cdeec)) at PDF/API2.pm line 212.
Separate problem. Can you please file another bug (against Module::ScanDeps). Thanx, Roderich
On Sun, Mar 28, 2010 at 11:42 PM, Djibril Ousmanou via RT <bug-Module-ScanDeps@rt.cpan.org> wrote: Show quoted text
> Thank you for your patch.
Committed, will be in the next release of Module::ScanDeps.
Le Lun 29 Mar 2010 10:10:14, roderich.schupp@googlemail.com a écrit : Show quoted text
> On Sun, Mar 28, 2010 at 11:42 PM, Djibril Ousmanou via RT > <bug-Module-ScanDeps@rt.cpan.org> wrote:
> > Thank you for your patch. Now I have this error message when I
> execute
> > my test.exe : > > > > Can't locate PerlIO.pm in @INC (@INC contains: > > C:\Users\beline\AppData\Local\Temp\par-user\cache-
> 31b4270c10dbd27682a5add65c
> > 2321943bd7f61d\inc\lib > > C:\Users\user\AppData\Local\Temp\par-user\cache-
> 31b4270c10dbd27682a5add65c2321943bd7f61d\inc
> > CODE( > > 0x28cdbec) CODE(0x28cdeec)) at PDF/API2.pm line 212.
> > Separate problem. Can you please file another bug (against > Module::ScanDeps). > > Thanx, Roderich
I don't understand why you say taht it is a separate problem ? Have I to write this last bug in PAR::Packet rt cpan ? Thank you
Subject: Re: [rt.cpan.org #56020] PAR::Packer and PDF::API2 Unicode::UCD: failed to find UnicodeData.txt
Date: Wed, 31 Mar 2010 17:08:55 +0200
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Roderich Schupp <roderich.schupp [...] googlemail.com>
On Tue, Mar 30, 2010 at 1:03 PM, Djibril Ousmanou via RT <bug-Module-ScanDeps@rt.cpan.org> wrote: Show quoted text
> I don't understand why you say taht it is a separate problem ?
This problem has nothing to do with original bug report' s subject line (though it manifests itself with the same program). In the interest of other people googling for similar bugs it would be nice if you filed this as a separate bug in rt.cpan.org, e.g. with a subject line containing "Can't locate PerlIO.pm". It's also easier to track fixes that way. Show quoted text
> Have I to write this last bug in PAR::Packet rt cpan ?
It's actually a problem in Module::ScanDeps, but most people will encounter it in the context of PAR::Packer, so either module is OK. Cheers, Roderich
Dear, I have PAR 1.000, PAR::Packer 1.04 and Module::ScanDeps 0.97. Unicode::UCD: failed to find UnicodeData.txt in CODE(0x2dbe814) CODE(0x29f14ec) C:/.... ODE(0x29f17ec) at PDF/API2/Resource/Font/BdFont.pm line 45 Compilation failed in require at PDF/API2/Resource/Font/BdFont.pm line 45. BEGIN failed--compilation aborted at PDF/API2/Resource/Font/BdFont.pm line 45. Compilation failed in require at PDF/API2.pm line 67. BEGIN failed--compilation aborted at PDF/API2.pm line 67. ... This update in Module::ScanDeps does not resolv my bug : 'Unicode/UCD.pm' => sub { # add data files (cf. sub openunicode in Unicode::UCD) grep /\.txt$/, map "unicore/$_->{name}", _glob_in_inc('unicore', 0); }, I think that UnicodeData.txt is followed in C:/Perl/site/lib/unicore but in my computer (perl 5.10 1007), this file is in C:\Perl\lib\unicore Is it the problem ?? Djibril
On Thu May 27 13:31:55 2010, DJIBEL wrote: Show quoted text
> I have PAR 1.000, PAR::Packer 1.04 and Module::ScanDeps 0.97. > > Unicode::UCD: failed to find UnicodeData.txt in CODE(0x2dbe814)
::: Show quoted text
> I think that UnicodeData.txt is followed in C:/Perl/site/lib/unicore but > in my computer (perl 5.10 1007), this file is in C:\Perl\lib\unicore > > Is it the problem ??
Nope. Can you try the following (all on one line) pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = charinfo(0x42); print $i->{name};" running ucd.exe should print LATIN CAPITAL LETTER B If this doesn't work, examine ucd.exe with unzip -l ucd.exe and look for UnicodeData.txt. If it does work however, the problem is perhaps in PDF::API2, please post a minimal example script that demonstrates the problem. Cheers, Roderich
Dear, Show quoted text
> Nope. Can you try the following (all on one line) > > pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = > charinfo(0x42); print $i->{name};" > > running ucd.exe should print > > LATIN CAPITAL LETTER B
It works well. Show quoted text
> If it does work however, > the problem is perhaps in PDF::API2, please post a > minimal example script that demonstrates the problem. > > Cheers, Roderich >
I found the problem. That is my program : #!/usr/bin/perl use strict; use warnings; use Carp; use PDF::API2; print "Hello"; PDF::API2 needs UnicodeData.txt. PDF::API2::Resource::Font::BdFont.pm line 45 calls Unicode::UCD in Unicode::UCD ( line 95), it searches the UnicodeData.txt in @Inc (@INC : C:/Perl/site/lib C:/Perl/lib .) and this file in Actiperl5.12 is in C:\Perl\lib\unicore. When we create a .exe with Perl. The INC changes and the program searches this file in temp directory (par-xxx). But I create my .exe using -C option that deletes this temp directory. That is why .exe didn't find the unicode file. Then, it is not a bug, but be careful when you use -C option (with pp) when you add modules that need txt files. Best regards, Djibril