Skip Menu |

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.
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
#!/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
Download foobar.par
application/octet-stream 836b

Message body not shown because it is not plain text.

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.
Fixed in 1.001002 by bumping the Class::Inspector prereq.