X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass.pm;h=79d763081faf13f5fdf623bcbd53f9a55210a2e4;hb=514b84f6b60b566d75d2ff2ddd08659c4cf7b427;hp=8f21f545fbde709a197b0d743e524b45409376fe;hpb=a2bd379666d729133d65c85dc775627937084b18;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index 8f21f54..79d7630 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -11,34 +11,46 @@ our $VERSION; # $VERSION declaration must stay up here, ahead of any other package # declarations, as to not confuse various modules attempting to determine # this ones version, whether that be s.c.o. or Module::Metadata, etc -$VERSION = '0.082700_06'; +$VERSION = '0.082899_15'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases use DBIx::Class::_Util; use mro 'c3'; -use DBIx::Class::Optional::Dependencies; - use base qw/DBIx::Class::Componentised DBIx::Class::AccessorGroup/; use DBIx::Class::StartupCheck; use DBIx::Class::Exception; __PACKAGE__->mk_group_accessors(inherited => '_skip_namespace_frames'); -__PACKAGE__->_skip_namespace_frames('^DBIx::Class|^SQL::Abstract|^Try::Tiny|^Class::Accessor::Grouped|^Context::Preserve'); - -sub mk_classdata { - shift->mk_classaccessor(@_); -} - -sub mk_classaccessor { - my $self = shift; - $self->mk_group_accessors('inherited', $_[0]); - $self->set_inherited(@_) if @_ > 1; +__PACKAGE__->_skip_namespace_frames('^DBIx::Class|^SQL::Abstract|^Try::Tiny|^Class::Accessor::Grouped|^Context::Preserve|^Moose::Meta::'); + +# FIXME - this is not really necessary, and is in +# fact going to slow things down a bit +# However it is the right thing to do in order to get +# various install bases to highlight their brokenness +# Remove at some unknown point in the future +# +# The oddball BEGIN is there for... reason unknown +# It does make non-segfaulty difference on pre-5.8.5 perls, so shrug +BEGIN { + sub DESTROY { &DBIx::Class::_Util::detected_reinvoked_destructor }; } sub component_base_class { 'DBIx::Class' } +my $mro_already_set; +sub inject_base { + + # only examine from $_[2] onwards + # C::C3::C already sets c3 on $_[1] and $_[0] is irrelevant + mro::set_mro( $_ => 'c3' ) for grep { + $mro_already_set->{$_} ? 0 : ( $mro_already_set->{$_} = 1 ) + } @_[2 .. $#_]; + + shift->next::method(@_); +} + sub MODIFY_CODE_ATTRIBUTES { my ($class,$code,@attrs) = @_; $class->mk_classdata('__attr_cache' => {}) @@ -202,7 +214,7 @@ Then you can use these classes in your application's code: my $cd = $millennium_cds_rs->next; # SELECT ... FROM cds JOIN artists ... my $cd_artist_name = $cd->artist->name; # Already has the data so no 2nd query - # new() makes a Result object but doesnt insert it into the DB. + # new() makes a Result object but doesn't insert it into the DB. # create() is the same as new() then insert(). my $new_cd = $schema->resultset('CD')->new({ title => 'Spoon' }); $new_cd->artist($cd->artist); @@ -255,8 +267,10 @@ Contributions are always welcome, in all usable forms (we especially welcome documentation improvements). The delivery methods include git- or unified-diff formatted patches, GitHub pull requests, or plain bug reports either via RT or the Mailing list. Contributors are generally -granted full access to the official repository after their first patch -passes successful review. +granted access to the official repository after their first several +patches pass successful review. Don't hesitate to +L either of the L with +any further questions you may have. =for comment FIXME: Getty, frew and jnap need to get off their asses and finish the contrib section so we can link it here ;) @@ -277,7 +291,7 @@ accessible at the following locations: =item * Travis-CI log: L =for html -↪ Stable branch CI status: +↪ Bleeding edge dev CI status: =back @@ -298,6 +312,23 @@ the root of this distribution (or repository). The canonical source of per-line authorship is the L history itself. +=head1 CAT HERDERS + +The fine folks nudging the project in a particular direction: + +=over + +B: Peter Rabbitson +(present day maintenance and controlled evolution) + +B: Jess Robinson +(lions share of the reference documentation and manuals) + +B: Matt S Trout (project founder - +original idea, architecture and implementation) + +=back + =head1 COPYRIGHT AND LICENSE Copyright (c) 2005 by mst, castaway, ribasushi, and other DBIx::Class