[Catalyst-commits] r9779 - 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
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Tue Apr 21 21:01:06 GMT 2009
Author: karpet
Date: 2009-04-21 22:01:06 +0100 (Tue, 21 Apr 2009)
New Revision: 9779
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/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
Log:
release 0.41
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2009-04-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2009-04-21 21:01:06 UTC (rev 9779)
@@ -197,4 +197,8 @@
* change base Controller to call can_read() rather than can_write() in edit().
This is because the call to edit() does not actually write anything; it's just a GET
for a form.
+
+0.41 21 April 2009
+ * remove Catalyst::Component::ACCEPT_CONTEXT as a dependency since it has not been
+ updated for Catalyst 5.8.
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL 2009-04-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Makefile.PL 2009-04-21 21:01:06 UTC (rev 9779)
@@ -13,7 +13,6 @@
'Data::Pageset' => 0,
'Class::Accessor::Fast' => 0,
'Class::Data::Inheritable' => 0,
- 'Catalyst::Component::ACCEPT_CONTEXT' => 0,
'Catalyst::Runtime' => 0,
'Catalyst::Exception' => 0,
'Path::Class::File' => 0,
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2009-04-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -36,7 +36,7 @@
naked_results => 0,
);
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -3,7 +3,7 @@
use warnings;
use Carp;
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -4,7 +4,7 @@
use Carp;
use base qw( CatalystX::CRUD );
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -10,7 +10,7 @@
__PACKAGE__->mk_accessors(qw( inc_path ));
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -9,7 +9,7 @@
__PACKAGE__->mk_accessors(qw( use_ilike ne_sign ));
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -3,14 +3,14 @@
use warnings;
use base qw(
CatalystX::CRUD
- Catalyst::Component::ACCEPT_CONTEXT
Catalyst::Model
);
use Class::C3;
+use Scalar::Util ();
-our $VERSION = '0.40';
+our $VERSION = '0.41';
-__PACKAGE__->mk_accessors(qw( object_class page_size ));
+__PACKAGE__->mk_accessors(qw( object_class page_size context ));
__PACKAGE__->config( page_size => 50 );
@@ -119,6 +119,51 @@
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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -3,7 +3,7 @@
use warnings;
use base qw( CatalystX::CRUD::ModelAdapter );
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=head1 NAME
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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -13,7 +13,7 @@
__PACKAGE__->mk_accessors(qw( content file ));
__PACKAGE__->delegate_class('Path::Class::File');
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -9,7 +9,7 @@
__PACKAGE__->mk_ro_accessors(qw( delegate ));
__PACKAGE__->mk_classdata('delegate_class');
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -9,7 +9,7 @@
__PACKAGE__->mk_accessors(qw( enable_rpc_compat ));
__PACKAGE__->config( enable_rpc_compat => 0 );
-our $VERSION = '0.40';
+our $VERSION = '0.41';
#warn "REST VERSION = $VERSION";
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2009-04-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -7,7 +7,7 @@
__PACKAGE__->mk_ro_accessors(qw( count pager query results ));
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -8,7 +8,7 @@
__PACKAGE__->mk_accessors( qw( form_fields ) );
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=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-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -7,7 +7,7 @@
__PACKAGE__->mk_accessors(qw( params fields ));
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2009-04-21 15:23:42 UTC (rev 9778)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2009-04-21 21:01:06 UTC (rev 9779)
@@ -4,7 +4,7 @@
use strict;
use Carp;
-our $VERSION = '0.40';
+our $VERSION = '0.41';
=head1 NAME
More information about the Catalyst-commits
mailing list