Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Class-C3-Componentised CPAN distribution.

Report information
The Basics
Id: 42845
Status: resolved
Priority: 0/
Queue: Class-C3-Componentised

People
Owner: Nobody in particular
Requestors: TJC [...] cpan.org
Cc: tobyc [...] strategicdata.com.au
AdminCc:

Bug Information
Severity: Important
Broken in: 1.0003
Fixed in: 1.001002



CC: tobyc [...] strategicdata.com.au
Subject: ensure_class_loaded() fails when class is inside a 'use PAR' archive.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1233105911-29719-674"
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Length: 790
Download (untitled) / with headers
text/plain 790b
The ensure_class_found() method should return true if the given class name is installed on the system. If you run a script.pl + module.pm when they are BOTH inside a PAR file, or BOTH in a normal filesystem, then the ensure_class_found() method will successfully indicate that module is installed. However is module.pm is inside a PAR file, and script.pl is doing "use PAR 'module.par';" in order to access it, then the ensure_class_found() method will incorrectly report that module is NOT installed. Attached are two files, foobar.par (containing test_c3.pl and Foo/Bar.pm) and test_c3_par.pl. To demonstrate the problem, first try running: parl foobar.par test_c3.pl -- This returns that Foo::Bar was located. Then run: ./test_c3_par.pl -- this returns that Foo::Bar was NOT located.
Subject: test_c3_par.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1233105911-29719-673"
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: application/x-perl; name="test_c3_par.pl"
Content-Disposition: inline; filename="test_c3_par.pl"
Content-Transfer-Encoding: base64
Content-Length: 203
Download test_c3_par.pl
text/x-perl 203b
#!/usr/bin/perl use strict; use warnings; use PAR 'foobar.par'; use base 'Class::C3::Componentised'; __PACKAGE__->ensure_class_found('Foo::Bar') or die("Foo::Bar not found"); print "Foo::Bar found.\n";
Subject: foobar.par
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1233105865-29719-672"
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: application/octet-stream; name="foobar.par"
Content-Disposition: inline; filename="foobar.par"
Content-Transfer-Encoding: base64
Content-Length: 836
Download foobar.par
application/octet-stream 836b

Message body not shown because it is not plain text.

MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-7681-1298417814-909.42845-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 923
Download (untitled) / with headers
text/plain 923b
On Tue Jan 27 20:25:17 2009, TJC wrote: Show quoted text
> The ensure_class_found() method should return true if the given class > name is installed on the system. > > If you run a script.pl + module.pm when they are BOTH inside a PAR file, > or BOTH in a normal filesystem, then the ensure_class_found() method > will successfully indicate that module is installed. > > However is module.pm is inside a PAR file, and script.pl is doing "use > PAR 'module.par';" in order to access it, then the ensure_class_found() > method will incorrectly report that module is NOT installed. > > Attached are two files, foobar.par (containing test_c3.pl and > Foo/Bar.pm) and test_c3_par.pl. > > To demonstrate the problem, first try running: > parl foobar.par test_c3.pl > -- This returns that Foo::Bar was located. > Then run: > ./test_c3_par.pl > -- this returns that Foo::Bar was NOT located.
Stalling while waiting on upstream bug resolution.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-2619-1519584003-1809.42845-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 57
Fixed in 1.001002 by bumping the Class::Inspector prereq.


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.