[Dbix-class] Strange failure in DBIx::Class
Ovid
publiustemp-dbic at yahoo.com
Mon Dec 14 15:18:47 GMT 2009
--- On Mon, 14/12/09, Ovid <publiustemp-dbic at yahoo.com> wrote:
> From: Ovid <publiustemp-dbic at yahoo.com>
> Trying to print the DBIx::Class
> version prior to loading it's components is silly:
>
> #!/usr/bin/env perl
>
> package The::Schema;
> print $DBIx::Class::VERSION,$/;
> use base qw/DBIx::Class::Schema::Loader/;
>
> But I'm not expecting it to be a fatal error:
<snip>
Ignore this. http://twitter.com/confound/ pointed out to me that parsing $DBIx::Class::VERSION ensures that the has_version() function in 'base.pm' returns true, thus ensuring that "use base" won't try to load the offending class. Grr ...
Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://use.perl.org/~Ovid/journal/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
More information about the DBIx-Class
mailing list