[Jifty-commit] r2726 - jifty/trunk/lib
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jan 29 09:52:09 EST 2007
Author: audreyt
Date: Mon Jan 29 09:52:08 2007
New Revision: 2726
Modified:
jifty/trunk/lib/Jifty.pm
Log:
* Jifty.pm - Instead of randol popping @ISA (which works only if
Class::Accessor::Fast is somehow in the inheritance chain leading
up to WithFilter.pm), do an explicit pop.
Modified: jifty/trunk/lib/Jifty.pm
==============================================================================
--- jifty/trunk/lib/Jifty.pm (original)
+++ jifty/trunk/lib/Jifty.pm Mon Jan 29 09:52:08 2007
@@ -120,9 +120,11 @@
# Now that we've loaded the configuration, we can remove the temporary
# Jifty::DBI::Record baseclass for records and insert our "real" baseclass,
# which is likely Record::Cachable or Record::Memcached
- pop @Jifty::Record::ISA;
- Jifty::Util->require( Jifty->config->framework('Database')->{'RecordBaseClass'});
- push @Jifty::Record::ISA, Jifty->config->framework('Database')->{'RecordBaseClass'};
+ @Jifty::Record::ISA = grep { $_ ne 'Jifty::DBI::Record' } @Jifty::Record::ISA;
+
+ my $record_base_class = Jifty->config->framework('Database')->{'RecordBaseClass'};
+ Jifty::Util->require( $record_base_class );
+ push @Jifty::Record::ISA, $record_base_class unless $record_base_class eq 'Jifty::Record';
Jifty->logger( Jifty::Logger->new( $args{'logger_component'} ) );
More information about the Jifty-commit
mailing list