Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parse-ErrorString-Perl CPAN distribution.

Report information
The Basics
Id: 42004
Status: resolved
Priority: 0/
Queue: Parse-ErrorString-Perl

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

Bug Information
Severity: Critical
Broken in: 0.11
Fixed in: (no value)



Subject: Makefile.PL error (does not install) and tests fail
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 4562
Download (untitled) / with headers
text/plain 4.4k
Hi, first let me thank you for creating this nice module! Unfortunately, version 0.08 does not install properly on my system (and cpantesters is accusing the same problem). Here's the output: -------------------8<------------------- cpan[1]> install Parse::ErrorString::Perl CPAN: Storable loaded ok (v2.18) Going to read /root/.cpan/Metadata Database was generated on Sun, 28 Dec 2008 02:28:28 GMT Running install for module 'Parse::ErrorString::Perl' Running make for P/PS/PSHANGOV/Parse-ErrorString-Perl-0.08.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: File::Which loaded ok (v0.05) CPAN: Compress::Zlib loaded ok (v2.015) Checksum for /root/.cpan/sources/authors/id/P/PS/PSHANGOV/Parse-ErrorString-Perl-0.08.tar.gz ok Scanning cache /root/.cpan/build for sizes DONE Parse-ErrorString-Perl-0.08 Parse-ErrorString-Perl-0.08/Build.PL Parse-ErrorString-Perl-0.08/Changes Parse-ErrorString-Perl-0.08/Makefile.PL Parse-ErrorString-Perl-0.08/MANIFEST Parse-ErrorString-Perl-0.08/META.yml Parse-ErrorString-Perl-0.08/README Parse-ErrorString-Perl-0.08/bin Parse-ErrorString-Perl-0.08/bin/check_perldiag Parse-ErrorString-Perl-0.08/lib Parse-ErrorString-Perl-0.08/lib/Parse Parse-ErrorString-Perl-0.08/lib/Parse/ErrorString Parse-ErrorString-Perl-0.08/lib/Parse/ErrorString/Perl.pm Parse-ErrorString-Perl-0.08/t Parse-ErrorString-Perl-0.08/t/00-load.t Parse-ErrorString-Perl-0.08/t/01-errors.t Parse-ErrorString-Perl-0.08/t/02-diagnostics.t Parse-ErrorString-Perl-0.08/t/03-split_diagnostics.t Parse-ErrorString-Perl-0.08/t/04-perldiag.t Parse-ErrorString-Perl-0.08/t/05-stacktrace.t Parse-ErrorString-Perl-0.08/t/06-short_filename.t CPAN: File::Temp loaded ok (v0.21) CPAN: YAML loaded ok (v0.68) CPAN: Module::Build loaded ok (v0.31) CPAN.pm: Going to build P/PS/PSHANGOV/Parse-ErrorString-Perl-0.08.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Parse::ErrorString::Perl cp lib/Parse/ErrorString/Perl.pm blib/lib/Parse/ErrorString/Perl.pm make: *** No rule to make target `bin\check_perldiag', needed by `blib/script/bin\check_perldiag'. Stop. PSHANGOV/Parse-ErrorString-Perl-0.08.tar.gz make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: PSHANGOV/Parse-ErrorString-Perl-0.08.tar.gz : make NO cpan[2]> -------------------8<------------------- (I'm using Linux, by the way) I was able to fix this by manually downloading "Parse-ErrorString-Perl-0.08.tar.gz" and editing Makefile.PL, changing this: ---------8<------------- 'EXE_FILES' => [ 'bin\\check_perldiag' ], ---------8<------------- into this: ---------8<------------- 'EXE_FILES' => [ 'bin/check_perldiag' ], ---------8<------------- But although the "make" command runs ok, the "make test" issues the following error: ---------8<------------- # make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.................1/1 # Testing Parse::ErrorString::Perl 0.08, Perl 5.010000, /usr/bin/perl t/00-load.................ok t/01-errors...............ok t/02-diagnostics..........ok t/03-split_diagnostics....ok t/04-perldiag.............ok t/05-stacktrace...........ok t/06-short_filename.......1/4 # Failed test 'msg_short_script short path' # at t/06-short_filename.t line 15. # Looks like you failed 1 test of 4. t/06-short_filename....... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests Test Summary Report ------------------- t/06-short_filename (Wstat: 256 Tests: 4 Failed: 1) Failed test: 2 Non-zero exit status: 1 Files=7, Tests=82, 5 wallclock secs ( 0.12 usr 0.01 sys + 4.68 cusr 0.16 csys = 4.97 CPU) Result: FAIL Failed 1/7 test programs. 1/82 subtests failed. make: *** [test_dynamic] Error 1 ---------8<------------- Apparently, for the tested error string: "Use of uninitialized value $empty in length at c:\my\very\long\path\to\this\perl\script\called\error.pl line 6." , the "file" method should return only "error.pl" but is instead returning "c:\my\very\long\path\to\this\perl\script\called\error.pl" I don't know if the latter is an error of your module or of File::Spec, but since it's your test suit I thought you should at least have another look at it. Anyway, thanks! I hope this helps you to fix it soon :) Cheers, -b
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-19694-1230496826-1735.42004-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1624
Download (untitled) / with headers
text/plain 1.5k
Show quoted text
> > Apparently, for the tested error string: > > "Use of uninitialized value $empty in length at > c:\my\very\long\path\to\this\perl\script\called\error.pl line 6." > > , the "file" method should return only "error.pl" but is instead > returning "c:\my\very\long\path\to\this\perl\script\called\error.pl" > > > I don't know if the latter is an error of your module or of > File::Spec, > but since it's your test suit I thought you should at least have > another > look at it. >
It just occured to me that your test suite might be wrong after all. In the POD you say (for the "file" method): ---------------8<--------------- file The path to the file in which the error occurred, possibly trunicated. If the error occurred in a script, the parser will attempt to return only the filename; if the error occurred in a module, the parser will attempt to return the path to the module relative to the directory in @INC in which it resides. ---------------8<--------------- The key point is "the parser will attempt to return only the filename". So it should return "file.pl" ***IF*** I was on Windows. Since I am on Linux, "c:\my\very\long\path\to\this\perl\script\called\error.pl" is *not* a valid path, so the method is working properly by returning the full name - in fact, you can create a valid file named "c:\my\very\long\path\to\this\perl\script\called\error.pl" on linux, on any path. Perhaps you should create different error message strings for different operating systems, and use something like $^O or Devel::CheckOS to find the appropriate string to check under that OS. Hope this helps! Cheers, -b
MIME-Version: 1.0
Subject: (fix provided) Makefile.PL error (does not install) and tests fail
In-Reply-To: <rt-3.6.HEAD-19694-1230496826-1735.42004-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
References: <rt-3.6.HEAD-19694-1230496826-1735.42004-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1230497844-19694-478"
Message-ID: <rt-3.6.HEAD-19694-1230497844-477.42004-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 521
Download (untitled) / with headers
text/plain 521b
On Sun Dec 28 15:40:26 2008, GARU wrote: Show quoted text
> > Perhaps you should create different error message strings for different > operating systems, and use something like $^O or Devel::CheckOS to find > the appropriate string to check under that OS. >
Well, I got bored and did that for you. The new t/06-short_filename.t and Makefile.PL are attached to this message. I also provided them as a diff, if you prefer. Now 'make', 'make test' and 'make install' all work nicely. Hope to see the new CPAN release soon! Cheers, -b
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: multipart/mixed; boundary="----------=_1230497792-19694-476"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/x-patch; name="Makefile.PL.diff"
Content-Disposition: inline; filename="Makefile.PL.diff"
Content-Transfer-Encoding: binary
Content-Length: 113
Download Makefile.PL.diff
text/x-diff 113b
17c17 < 'bin\\check_perldiag' --- > 'bin/check_perldiag'
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1230497542-19694-475"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/troff; name="06-short_filename.t"
Content-Disposition: inline; filename="06-short_filename.t"
Content-Transfer-Encoding: binary
Content-Length: 1097
#!perl -T use Test::More tests => 4; use Parse::ErrorString::Perl; use File::Spec; my $parser = Parse::ErrorString::Perl->new; my $msg_short_script; if ($^O =~ m/win/i) { $msg_short_script = <<'ENDofMSG'; Use of uninitialized value $empty in length at c:\my\very\long\path\to\this\perl\script\called\error.pl line 6. ENDofMSG } else { $msg_short_script = <<'ENDofMSG'; Use of uninitialized value $empty in length at /my/very/long/path/to/this/perl/script/called/error.pl line 6. ENDofMSG } my @errors_short_script = $parser->parse_string($msg_short_script); ok(@errors_short_script, 'msg_short_script results'); ok($errors_short_script[0]->file eq 'error.pl', 'msg_short_script short path'); our @INC; my $path = File::Spec->catfile($INC[0], 'Error.pm'); my $msg_short_module = 'Use of uninitialized value $empty in length at ' . $path . ' line 6.'; my @errors_short_module = $parser->parse_string($msg_short_module); ok(@errors_short_module, 'msg_short_module results'); ok($errors_short_module[0]->file eq 'Error.pm', 'msg_short_module short path');
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: multipart/mixed; boundary="----------=_1230497529-19694-474"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/x-perl; name="Makefile.PL"
Content-Disposition: inline; filename="Makefile.PL"
Content-Transfer-Encoding: base64
Content-Length: 761
Download Makefile.PL
text/x-perl 761b
# Note: this file was auto-generated by Module::Build::Compat version 0.30 use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'Parse::ErrorString::Perl', 'VERSION_FROM' => 'lib/Parse/ErrorString/Perl.pm', 'PREREQ_PM' => { 'Class::XSAccessor' => 0, 'File::Basename' => 0, 'File::Spec' => 0, 'Pod::Find' => 0, 'Pod::POM' => 0, 'Test::More' => 0 }, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [ 'bin/check_perldiag' ], 'PL_FILES' => {} ) ;
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1230497802-19694-477"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/x-patch; name="06-short-filename.t.diff"
Content-Disposition: inline; filename="06-short-filename.t.diff"
Content-Transfer-Encoding: binary
Content-Length: 337
9c9,11 < my $msg_short_script = <<'ENDofMSG'; --- > my $msg_short_script; > if ($^O =~ m/win/i) { > $msg_short_script = <<'ENDofMSG'; 11a14,19 > } > else { > $msg_short_script = <<'ENDofMSG'; > Use of uninitialized value $empty in length at /my/very/long/path/to/this/perl/script/called/error.pl line 6. > ENDofMSG > }
X-Ymail-Osg: Dd2GPOUVM1mEM7o5u.A0Q8PwoaSyhXbBlya.761C1SgHLRidwlonMyOjSMrJyPQrGtBSfURSN4C4Z7wM3ZTwiloWJ1waX3i0ysWmr5OQiZAScAy.Kh4F6jQB2kaEsKotvBjHiXmjmWWoRJSHlnle7QZ00rCE.FJe9IhGOOhKDG0.fsS1leukHjLS_rWYa8_U45JN6jd7eADfaxsW9WVbLVLpLVLxIrvo0adKIKU-
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_POLICY_TESTING,DK_SIGNED,DK_VERIFIED
X-Mailer: YahooMailRC/1155.45 YahooMailWebService/0.7.260.1
References: <RT-Ticket-42004 [...] rt.cpan.org> <rt-3.6.HEAD-19694-1230496826-1735.42004-5-0 [...] rt.cpan.org> <rt-3.6.HEAD-19694-1230497844-477.42004-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=utf-8
Message-ID: <987281.62579.qm [...] web53804.mail.re2.yahoo.com>
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 6CE5B4D8045 for <bug-Parse-ErrorString-Perl [...] rt.cpan.org>; Wed, 31 Dec 2008 13:03:27 -0500 (EST)
Received: (qmail 4703 invoked by uid 103); 31 Dec 2008 18:03:26 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 31 Dec 2008 18:03:26 -0000
Received: from web53804.mail.re2.yahoo.com (HELO web53804.mail.re2.yahoo.com) (206.190.36.199) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with SMTP; Wed, 31 Dec 2008 10:03:24 -0800
Received: (qmail 64135 invoked by uid 60001); 31 Dec 2008 18:03:21 -0000
Received: from [78.90.110.36] by web53804.mail.re2.yahoo.com via HTTP; Wed, 31 Dec 2008 10:03:20 PST
Delivered-To: cpan-bug+Parse-ErrorString-Perl [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #42004] (fix provided) Makefile.PL error (does not install) and tests fail
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jrDAiz3apdlI+d05budDcsWjZp87YUt/R2Li8B3RtruRn/mgPWZIsurIlcI3k7eaP1hiD2irxhtS8XCp+m/D7m0C8xkMjhp3DTdExAGayG0FOSStnAE9YMu/YQ0YbZv2ER9/jbaRBRtSmlaHpJaqHSm+N4ItiGrCfNrQJp2yjh8=;
Return-Path: <pshangov [...] yahoo.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-Parse-ErrorString-Perl [...] rt.cpan.org
Date: Wed, 31 Dec 2008 10:03:20 -0800 (PST)
X-Spam-Level: *
To: bug-Parse-ErrorString-Perl [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Petar Shangov <pshangov [...] yahoo.com>
RT-Message-ID: <rt-3.6.HEAD-23801-1230746612-261.42004-0-0 [...] rt.cpan.org>
Content-Length: 1106
Thanks very much for the feedback, a new version of the module will soon be on CPAN. It took some time since the Makefile.PL issue is not very trivial as it seems and fully resolving it will involve some bug-fixing of Module::Build. Petar Show quoted text
----- Original Message ----
> From: Breno G. de Oliveira via RT <bug-Parse-ErrorString-Perl@rt.cpan.org> > Sent: Sunday, 28 December, 2008 22:57:26 > Subject: [rt.cpan.org #42004] (fix provided) Makefile.PL error (does not install) and tests fail > > Queue: Parse-ErrorString-Perl > Ticket > > On Sun Dec 28 15:40:26 2008, GARU wrote:
> > > > Perhaps you should create different error message strings for different > > operating systems, and use something like $^O or Devel::CheckOS to find > > the appropriate string to check under that OS. > >
> > Well, I got bored and did that for you. The new t/06-short_filename.t > and Makefile.PL are attached to this message. I also provided them as a > diff, if you prefer. > > Now 'make', 'make test' and 'make install' all work nicely. > > Hope to see the new CPAN release soon! > > Cheers, > > -b


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.