Skip Menu |
 

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

Report information
The Basics
Id: 18076
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: joerg.braun [...] lbs-it.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.2611
Fixed in: (no value)



Subject: PodParser and no 'file' or 'fh' parameter
Download (untitled) / with headers
text/plain 448b
I tried to install DBIx::Class via CPAN, and manual after failure. I run perl Build.PL, after that perl Build. The error message is: No 'file' or 'fh' parameter given at C:/Perl/site/lib/Module/Build/PodParser.pm line 24. I had this error before with other packages, so I think it is not DBIx::Class. perl, v5.8.7 built for MSWin32-x86-multi-thread Binary build 815 [211909] provided by ActiveState Built Nov 2 2005 08:44:52 running on W2k
Download (untitled) / with headers
text/plain 675b
Hi Joerg, It looks like the opening of the file failed. The following patch should probably shed some light by failing in a more instructive way: diff -u -r1.556 Base.pm --- lib/Module/Build/Base.pm 9 Mar 2006 10:28:00 -0000 1.556 +++ lib/Module/Build/Base.pm 9 Mar 2006 16:18:16 -0000 @@ -2385,7 +2385,7 @@ ($path2root, $self->installdirs eq 'core' ? () : qw(site) ) ); - my $fh = IO::File->new($infile); + my $fh = IO::File->new($infile) or die "Can't read $infile: $!"; my $abstract = Module::Build::PodParser->new(fh => $fh)->get_abstract(); my $title = join( '::', (@dirs, $name) );
Subject: RE: [rt.cpan.org #18076] PodParser and no 'file' or 'fh' parameter ['LBS IT': überprüft]
Date: Fri, 10 Mar 2006 08:34:00 +0100
To: bug-Module-Build [...] rt.cpan.org
From: Joerg.Braun [...] lbs-it.de
Download (untitled) / with headers
text/plain 2.2k
"Ken_Williams via RT" <bug-Module-Build@rt.cpan.org> schrieb am 09.03.2006 17:19:42: Show quoted text
> diff -u -r1.556 Base.pm > --- lib/Module/Build/Base.pm 9 Mar 2006 10:28:00 -0000 1.556 > +++ lib/Module/Build/Base.pm 9 Mar 2006 16:18:16 -0000 > @@ -2385,7 +2385,7 @@ > ($path2root, > $self->installdirs eq 'core' ? () : qw(site) )
); Show quoted text
> > - my $fh = IO::File->new($infile); > + my $fh = IO::File->new($infile) or die "Can't read $infile: $!"; > my $abstract = Module::Build::PodParser->new(fh =>
$fh)->get_abstract(); Show quoted text
> > my $title = join( '::', (@dirs, $name) );
This does not fit to my files, so I did a fresh download with "perl -ICPAN", which made no difference. I found "new($infile" at one place in line 1828, which I changed to the following: { # my $fh = IO::File->new($infile); *** 10032006 JB my $fh = IO::File->new($infile) or die "Can't read $infile: $!"; my $abstract = Module::Build::PodParser->new(fh => $fh)->get_abstract(); And this is the result, now used with Module-Build-0.2612: -------------- C:\home\.cpan\build\Module-Build-0.2612>perl Build.PL Checking whether your kit is complete... Looks good * Optional prerequisite Module::Signature isn't installed * Optional prerequisite ExtUtils::ParseXS isn't installed * Optional prerequisite ExtUtils::CBuilder isn't installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation. Feature 'YAML_support' enabled. Deleting Build Removed previous script 'Build' Creating new 'Build' script for 'Module-Build' version '0.2612' C:\home\.cpan\build\Module-Build-0.2612>perl Build. Writing config notes to blib\lib\Module\Build\ConfigData.pm Manifying blib\lib/Module/Build/ConfigData.pm -> blib\libdoc\Module.Build.ConfigData.3 Can't read ../../../../../blib\lib/Module/Build/Platform/os2.pm: No such file or directory at C:\hom e\.cpan\build\Module-Build-0.2612\lib/Module/Build/Base.pm line 1829. C:\home\.cpan\build\Module-Build-0.2612>ls -l blib\lib/Module/Build/Platform/os2.pm -rw-rw-rw- 1 user group 682 Mar 3 05:29 blib\lib/Module/Build/Platform/os2.pm -------------- Do You need version information from other modules? Hope it helps. kind regards Joerg
Download (untitled) / with headers
text/plain 633b
Hi, A couple of other things to try: first, what version of File::Spec do you have installed? Also, a couple dozen lines above where you made the previous change, you'll see three lines that look like this: my $fulldir = File::Spec::Unix->catfile($htmldir, @rootdirs, @dirs); my $outfile = File::Spec::Unix->catfile($fulldir, $name . '.html'); my $infile = File::Spec::Unix->abs2rel($pod); Could you see what happens when you remove the "::Unix" part of those package names, so they just say File::Spec->... ? I tried reproducing your problem on a Windows machine here, but I couldn't get things to fail. -Ken
From: joerg.braun [...] lbs-it.de
Download (untitled) / with headers
text/plain 873b
On Do. 16. Mär. 2006, 18:21:37, KWILLIAMS wrote: Show quoted text
> Hi,
Sorry for the late answer. Show quoted text
> A couple of other things to try: first, what version of File::Spec do > you have installed?
It is $version 3.14, should have been installed with ActiveState Perl. Show quoted text
> Could you see what happens when you remove the "::Unix" part of those > package names, so > they just say File::Spec->... ?
I stepped through it and found that File::Spec::Unix->... gives paths like '..\..\blib/bla/bla', but File::Spec->... 'blib\bla\bla'. I replaced all occurences of File::Spec::Unix with File::Spec in Base.pm and it worked. Great! Show quoted text
> I tried reproducing your problem on a Windows machine here, but I > couldn't get things to fail.
So either mine or your machine is somehow messed up. Did You have other complains? No? Then it is my W2K. Any chance that ActiveState PPMs and CPAN cannot coexist?
Download (untitled) / with headers
text/plain 2.8k
I can confirm that I have also replicated this same bug. I'm using a fresh perl-5.8.8 install, built with mingw 3.4.5, on win XP. I had upgraded PathTools to 3.17, then tried installing Module-Build, and got this same error. I then upgraded CPAN from 1.7602 to 1.87, and still got the error. I followed the instructions above to change the 3 occurences of "File::Spec::Unix->" to "File::Spec->" and it now builds and tests OK. The exact error message I was getting was: No 'file' or 'fh' parameter given at C:\WINDOWS\TEMP\cpan\build\Module-Build-0.2612\lib/Module/Build/PodParser.pm line 24. Show quoted text
>perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=define use5005threads=undef useithreads=define usemultiplicity=de fine useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTE XT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='3.4.5', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseek size=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"c:\strawberry-perl\perl\lib\CORE" -L"C:\strawberry -perl\MinGW\lib"' libpth=C:\strawberry-perl\MinGW\lib libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lw inmm -lversion -lodbc32 -lodbccp32 libc=-lmsvcrt, so=dll, useshrplib=yes, libperl=libperl58.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"c:\strawberry-perl\perl\lib\CORE" -L" C:\strawberry-perl\MinGW\lib"' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO Built under MSWin32 Compiled at Apr 20 2006 09:23:28 @INC: c:/strawberry-perl/perl/lib c:/strawberry-perl/perl/site/lib .
Thanks, I've just committed this fix to the 0.26xx maintenance line. -Ken


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.