[Catalyst-commits] r10139 - in Catalyst-Runtime/5.80/trunk: . lib
lib/Catalyst t t/lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed May 13 23:37:03 GMT 2009
Author: t0m
Date: 2009-05-13 23:37:03 +0000 (Wed, 13 May 2009)
New Revision: 10139
Added:
Catalyst-Runtime/5.80/trunk/t/lib/TestAppWithMeta.pm
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/Makefile.PL
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm
Catalyst-Runtime/5.80/trunk/t/meta_method_unneeded.t
Log:
Fix the meta method test
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2009-05-13 22:57:54 UTC (rev 10138)
+++ Catalyst-Runtime/5.80/trunk/Changes 2009-05-13 23:37:03 UTC (rev 10139)
@@ -15,6 +15,9 @@
- Fix development server so that $c->engine->env returns the correct
environment (t0m)
- Require Moose 0.78 to fix metaclass incompatibility issues (t0m)
+ - Require MooseX::MethodAttributes 0.10 and use
+ Moose::Meta::Class->initialize rather than Moose->init_meta to fix
+ bugs related to having a 'meta' method in your controller (t0m)
5.80003 2009-04-29 16:23:53
- Various POD tweaks. (hdp, dandv)
Modified: Catalyst-Runtime/5.80/trunk/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/trunk/Makefile.PL 2009-05-13 22:57:54 UTC (rev 10138)
+++ Catalyst-Runtime/5.80/trunk/Makefile.PL 2009-05-13 23:37:03 UTC (rev 10139)
@@ -10,7 +10,7 @@
requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00801';
requires 'Class::MOP' => '0.83';
requires 'Moose' => '0.78';
-requires 'MooseX::MethodAttributes::Inheritable' => '0.09';
+requires 'MooseX::MethodAttributes::Inheritable' => '0.10';
requires 'Carp';
requires 'Class::C3::Adopt::NEXT' => '0.07';
requires 'CGI::Simple::Cookie';
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm 2009-05-13 22:57:54 UTC (rev 10138)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/ClassData.pm 2009-05-13 23:37:03 UTC (rev 10139)
@@ -1,6 +1,7 @@
package Catalyst::ClassData;
use Moose::Role;
+use Moose::Meta::Class ();
use Class::MOP;
use Moose::Util ();
@@ -13,7 +14,7 @@
my $accessor = sub {
my $pkg = ref $_[0] || $_[0];
my $meta = Moose::Util::find_meta($pkg)
- || Moose->init_meta( for_class => $pkg );
+ || Moose::Meta::Class->initialize( $pkg );
if (@_ > 1) {
$meta->namespace->{$attribute} = \$_[1];
return $_[1];
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-05-13 22:57:54 UTC (rev 10138)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-05-13 23:37:03 UTC (rev 10139)
@@ -1,6 +1,7 @@
package Catalyst;
use Moose;
+use Moose::Meta::Class ();
extends 'Catalyst::Component';
use Moose::Util qw/find_meta/;
use bytes;
@@ -2174,7 +2175,7 @@
sub _controller_init_base_classes {
my ($app_class, $component) = @_;
foreach my $class ( reverse @{ mro::get_linear_isa($component) } ) {
- Moose->init_meta( for_class => $class )
+ Moose::Meta::Class->initialize( $class )
unless find_meta($class);
}
}
Added: Catalyst-Runtime/5.80/trunk/t/lib/TestAppWithMeta.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/lib/TestAppWithMeta.pm (rev 0)
+++ Catalyst-Runtime/5.80/trunk/t/lib/TestAppWithMeta.pm 2009-05-13 23:37:03 UTC (rev 10139)
@@ -0,0 +1,13 @@
+package TestAppWithMeta;
+use strict;
+use warnings;
+use Catalyst;
+
+no warnings 'redefine';
+sub meta {}
+use warnings 'redefine';
+
+__PACKAGE__->setup;
+
+1;
+
Modified: Catalyst-Runtime/5.80/trunk/t/meta_method_unneeded.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/meta_method_unneeded.t 2009-05-13 22:57:54 UTC (rev 10138)
+++ Catalyst-Runtime/5.80/trunk/t/meta_method_unneeded.t 2009-05-13 23:37:03 UTC (rev 10139)
@@ -2,7 +2,7 @@
use warnings;
use FindBin qw/$Bin/;
use lib "$Bin/lib";
-use Test::More tests => 2;
+use Test::More tests => 1;
use Test::Exception;
use Carp ();
@@ -14,16 +14,6 @@
# This is/was demonstrated by Catalyst::Controller::WrapCGI
# and Catalyst::Plugin::Cache::Curried
-{
- package TestAppWithMeta;
- use Catalyst;
- no warnings 'redefine';
- sub meta {}
-}
-BEGIN {
- lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';
-}
-
use Catalyst::Test 'TestAppWithMeta';
ok( request('/')->is_success );
More information about the Catalyst-commits
mailing list