[Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

Toby Corkindale toby.corkindale at strategicdata.com.au
Wed Jan 28 01:16:29 GMT 2009


Toby Corkindale wrote:
> Hi,
> I seem to have hit an issue in a specific case:
> Deployment, to a Postgres DB, when DBIx::Class is running from a PAR file.
> The crux is that DBIx::Class::Storage::DBI::Pg has overridden =

> sqlt_type() to return 'PostgreSQL' rather than the default behaviour =

> from DBIx::Class::Storage::DBI, which just returns $dbh->{Driver}{Name}.
> The long form of the name is required when calling out to =

> SQL::Translator, in order that it finds the correct Producer module.
> =

> However, when running from a PAR file, for some reason the =

> Class::C3::Componentised::ensure_class_loaded() method is failing to =

> find and load DBIx::Class::Storage::DBI::Pg during =

> DBIx::Class::Schema::Storage::DBI::_populate_dbh() around line 1639 (of =

> version 0.08010).
> =

> I've verified that the PAR file does actually contain that Pg.pm in the =

> correct place..
> =

> but I wondered if anyone else had seen this problem, or had an idea =

> where I should be looking next?

Right, I think I've worked out where the problem lies now.

Class::C3::Componentised's ensure_class_found() method *does not work* =

in the following situation: When the class exists inside a PAR file =

which is being accessed via the "use PAR 'archive.par';" method.

I attach the simplest test case I could create for this.

To demonstrate, try:
$ parl foobar.par test_c3.pl
Foo::Bar found.
$ ./test_c3_par.pl
Foo::Bar not found at ./test_c3_par.pl line 7.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_c3_par.pl
Type: application/x-perl
Size: 203 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20090128/76=
34dd50/test_c3_par.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foobar.par
Type: application/octet-stream
Size: 836 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20090128/76=
34dd50/foobar.obj


More information about the DBIx-Class mailing list