[Catalyst-commits] r9807 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX lib/CatalystX/CRUD
lib/CatalystX/CRUD/Iterator lib/CatalystX/CRUD/Model
lib/CatalystX/CRUD/ModelAdapter lib/CatalystX/CRUD/Object
lib/CatalystX/CRUD/Test t t/lib/MyApp/Controller/REST
t/lib/MyApp/Model
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Thu Apr 23 16:37:20 GMT 2009
Author: karpet
Date: 2009-04-23 17:37:19 +0100 (Thu, 23 Apr 2009)
New Revision: 9807
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/t/00-load.t
CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Controller/REST/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Model/FileSearch.pm
Log:
bump version and
* revert ACCEPT_CONTEXT changes; fixes pushed to new C::C::A_C
* on CPAN, and added no warnings
using Class::C3::Adopt::NEXT (thanks to t0m)
* change from 'use Class::C3' to 'use mro "c3"' with new dep on
* MRO::Compat
* added some debugging in tests
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2009-04-23 16:37:19 UTC (rev 9807)
@@ -201,4 +201,10 @@
0.41 21 April 2009
* remove Catalyst::Component::ACCEPT_CONTEXT as a dependency since it has not been
updated for Catalyst 5.8.
-
+
+0.42 xxx
+ * revert ACCEPT_CONTEXT changes; fixes pushed to new C::C::A_C on CPAN, and added no warnings
+ using Class::C3::Adopt::NEXT (thanks to t0m)
+ * change from 'use Class::C3' to 'use mro "c3"' with new dep on MRO::Compat
+ * added some debugging in tests
+
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL 2009-04-23 16:37:19 UTC (rev 9807)
@@ -14,8 +14,10 @@
'Class::Accessor::Fast' => 0,
'Class::Data::Inheritable' => 0,
'Catalyst::Runtime' => 0,
+ 'Catalyst::Component::ACCEPT_CONTEXT' => 0.06,
'Catalyst::Exception' => 0,
'Path::Class::File' => 0,
+ 'MRO::Compat' => 0.10,
'Class::C3' => 0.20,
'Data::Dump' => 0, # for testing
'Sort::SQL' => 0.03,
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -8,7 +8,7 @@
use Carp;
use Catalyst::Utils;
use CatalystX::CRUD::Results;
-use Class::C3;
+use mro 'c3';
use Data::Dump qw( dump );
__PACKAGE__->mk_accessors(
@@ -36,7 +36,7 @@
naked_results => 0,
);
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -3,7 +3,7 @@
use warnings;
use Carp;
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -4,7 +4,7 @@
use Carp;
use base qw( CatalystX::CRUD );
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -6,11 +6,11 @@
use Carp;
use Data::Dump qw( dump );
use Path::Class;
-use Class::C3;
+use mro 'c3';
__PACKAGE__->mk_accessors(qw( inc_path ));
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -9,7 +9,7 @@
__PACKAGE__->mk_accessors(qw( use_ilike ne_sign ));
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -1,16 +1,16 @@
package CatalystX::CRUD::Model;
use strict;
use warnings;
+use mro 'c3';
use base qw(
+ Catalyst::Component::ACCEPT_CONTEXT
CatalystX::CRUD
Catalyst::Model
);
-use Class::C3;
-use Scalar::Util ();
-our $VERSION = '0.41';
+our $VERSION = '0.42';
-__PACKAGE__->mk_accessors(qw( object_class page_size context ));
+__PACKAGE__->mk_accessors(qw( object_class page_size ));
__PACKAGE__->config( page_size => 50 );
@@ -119,51 +119,6 @@
return $self;
}
-=head2 ACCEPT_CONTEXT
-
-(Cribbed from Catalyst::Component::ACCEPT_CONTEXT to reduce the (broken
-in 5.8) dependency.)
-
-Catalyst calls this method to give the current context to your model.
-You should never call it directly.
-
-Note that a new instance of your component isn't created. All we do
-here is shove C<$c> into your component. ACCEPT_CONTEXT allows for
-other behavior that may be more useful; if you want something else to
-happen just implement it yourself.
-
-See L<Catalyst::Component> for details.
-
-=cut
-
-sub ACCEPT_CONTEXT {
- my $self = shift;
- my $context = shift;
-
- $self->{context} = $context;
- Scalar::Util::weaken( $self->{context} );
-
- return $self->maybe::next::method( $context, @_ ) || $self;
-}
-
-=head2 COMPONENT
-
-(Cribbed from Catalyst::Component::ACCEPT_CONTEXT to reduce the (broken
-in 5.8) dependency.)
-
-Overridden to use initial application object as context before a request.
-
-=cut
-
-sub COMPONENT {
- my $class = shift;
- my $app = shift;
- my $args = shift;
- $args->{context} = $app;
- Scalar::Util::weaken( $args->{context} ) if ref $args->{context};
- return $class->maybe::next::method( $app, $args, @_ );
-}
-
=head2 page_size
Returns the C<page_size> set in config().
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -3,7 +3,7 @@
use warnings;
use base qw( CatalystX::CRUD::ModelAdapter );
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -5,7 +5,7 @@
CatalystX::CRUD
Class::Accessor::Fast
);
-use Class::C3;
+use mro 'c3';
use Carp;
__PACKAGE__->mk_accessors(qw( model_name model_meta context app_class ));
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -4,7 +4,7 @@
use base qw( CatalystX::CRUD::Object );
use Path::Class::File;
use Carp;
-use Class::C3;
+use mro 'c3';
use overload(
q[""] => sub { shift->delegate },
fallback => 1,
@@ -13,7 +13,7 @@
__PACKAGE__->mk_accessors(qw( content file ));
__PACKAGE__->delegate_class('Path::Class::File');
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -3,13 +3,13 @@
use warnings;
use base qw( Class::Accessor::Fast Class::Data::Inheritable CatalystX::CRUD );
use Carp;
-use Class::C3;
+use mro 'c3';
Class::C3::initialize();
__PACKAGE__->mk_ro_accessors(qw( delegate ));
__PACKAGE__->mk_classdata('delegate_class');
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -3,13 +3,13 @@
use warnings;
use base qw( CatalystX::CRUD::Controller );
use Carp;
-use Class::C3;
+use mro 'c3';
use Data::Dump qw( dump );
__PACKAGE__->mk_accessors(qw( enable_rpc_compat ));
__PACKAGE__->config( enable_rpc_compat => 0 );
-our $VERSION = '0.41';
+our $VERSION = '0.42';
#warn "REST VERSION = $VERSION";
@@ -71,7 +71,7 @@
__PACKAGE__->setup();
# add these 2 lines
- use Class::C3;
+ use mro 'c3';
Class::C3::initialize();
This is required for Class::C3 to resolve the inheritance chain correctly,
@@ -149,6 +149,8 @@
return;
}
+ $c->log->debug( "rpc compat mode = " . $self->enable_rpc_compat )
+ if $c->debug;
$c->log->debug( "rest args : " . dump \@arg ) if $c->debug;
my $n = scalar @arg;
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -3,11 +3,11 @@
use warnings;
use base qw( Class::Accessor::Fast );
use Carp;
-use Class::C3;
+use mro 'c3';
__PACKAGE__->mk_ro_accessors(qw( count pager query results ));
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -4,11 +4,11 @@
use base qw( CatalystX::CRUD::Controller );
use Carp;
use Data::Dump;
-use Class::C3;
+use mro 'c3';
__PACKAGE__->mk_accessors( qw( form_fields ) );
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -7,7 +7,7 @@
__PACKAGE__->mk_accessors(qw( params fields ));
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -4,7 +4,7 @@
use strict;
use Carp;
-our $VERSION = '0.41';
+our $VERSION = '0.42';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/00-load.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/00-load.t 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/00-load.t 2009-04-23 16:37:19 UTC (rev 9807)
@@ -1,17 +1,19 @@
#!perl
-use Test::More tests => 9;
+use Test::More tests => 10;
BEGIN {
- use_ok( 'CatalystX::CRUD' );
- use_ok( 'CatalystX::CRUD::Model' );
- use_ok( 'CatalystX::CRUD::Controller' );
- use_ok( 'CatalystX::CRUD::REST' );
- use_ok( 'CatalystX::CRUD::Object' );
- use_ok( 'CatalystX::CRUD::Iterator' );
- use_ok( 'CatalystX::CRUD::Model::File' );
- use_ok( 'CatalystX::CRUD::Object::File' );
- use_ok( 'CatalystX::CRUD::Iterator::File' );
+ use_ok('Catalyst');
+ use_ok('CatalystX::CRUD');
+ use_ok('CatalystX::CRUD::Model');
+ use_ok('CatalystX::CRUD::Controller');
+ use_ok('CatalystX::CRUD::REST');
+ use_ok('CatalystX::CRUD::Object');
+ use_ok('CatalystX::CRUD::Iterator');
+ use_ok('CatalystX::CRUD::Model::File');
+ use_ok('CatalystX::CRUD::Object::File');
+ use_ok('CatalystX::CRUD::Iterator::File');
}
-diag( "Testing CatalystX::CRUD $CatalystX::CRUD::VERSION, Perl $], $^X" );
+diag("Testing CatalystX::CRUD $CatalystX::CRUD::VERSION, Perl $], $^X");
+diag("Using Catalyst version $Catalyst::VERSION");
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Controller/REST/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Controller/REST/File.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Controller/REST/File.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -8,7 +8,7 @@
use Data::Dump qw( dump );
use File::Temp;
use MyApp::Form;
-use Class::C3;
+use mro 'c3';
__PACKAGE__->config(
primary_key => 'absolute',
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Model/FileSearch.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Model/FileSearch.pm 2009-04-23 13:21:23 UTC (rev 9806)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/lib/MyApp/Model/FileSearch.pm 2009-04-23 16:37:19 UTC (rev 9807)
@@ -6,7 +6,7 @@
);
use MyApp::File;
__PACKAGE__->config( object_class => 'MyApp::File' );
-use Class::C3;
+use mro 'c3';
sub make_query {
my ($self) = @_;
More information about the Catalyst-commits
mailing list