all_from 'lib/Catalyst/Runtime.pm';
requires 'namespace::clean';
-requires 'B::Hooks::EndOfScope';
+requires 'Scope::Upper';
requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00700';
requires 'Moose' => '0.64';
requires 'Carp';
- Run another round of repository smokes against latest 5.80 trunk, manually
go through all the things which are broken (t0m).
- - Catalyst::Plugin::Authorization::ACL
- - Catalyst::Plugin::Server
- - Catalyst::Plugin::HTML::Widget
- - Should hopefully be fixed now..
+ - Catalyst-Plugin-Session-State-Cookie
+ Catalyst-Plugin-Session-Store-FastMmap
+ Catalyst-Plugin-Session-PerUser
+ Catalyst-Plugin-Session-Store-File
+ Catalyst-Authentication-Credential-HTTP
+ Catalyst-Plugin-SmartURI
+ - All fixed by Scope::Upper
- Catalyst-Log-Log4perl Deep recursion on subroutine "MockApp::setup"
(rafl)
still support that, but warn for/deprecate it so it can go for 5.9X...
This obviously needs better tests :/
- - With 5.7 people did extends qw/Moose::Object Catalyst::Component/, now
- Catalyst::Component isa Moose::Object so now isa doesn't linearize
- anymore, test case..
-
Cleanups:
- Update Test suite to not assume MyApp ISA Controller
- Fix the Roadmap to be less full of lies.
+ - With 5.7 people did extends qw/Moose::Object Catalyst::Component/, now
+ Catalyst::Component isa Moose::Object so now isa doesn't linearize
+ anymore, docs of what doesn't work and why (rafl)
+
Profiling:
- vs 5.70 and optimisation as needed.
use Class::MOP::Object ();
extends 'Catalyst::Component';
use bytes;
-use B::Hooks::EndOfScope;
+use Scope::Upper ();
use Catalyst::Exception;
use Catalyst::Log;
use Catalyst::Request;
# Note however that we have to do the work on scope end, so that method
# modifiers work correctly in MyApp (as you have to call setup _before_
# applying modifiers).
- on_scope_end {
+ Scope::Upper::reap(sub {
my $meta = $class->Moose::Object::meta();
$meta->make_immutable unless $meta->is_immutable;
- };
+ }, 1);
$class->setup_finished(1);
}
+++ /dev/null
-{
- package NewTestPlugin;
- use strict;
- use warnings;
- sub new {
- my $class = shift;
- return bless $_[0], $class;
- }
-}
-
-{
- package TestAppPluginWithNewMethod;
- use Test::Exception;
- use Catalyst qw/+NewTestPlugin/;
-
- sub foo : Local {
- my ($self, $c) = @_;
- $c->res->body('foo');
- }
-
- use Moose; # Just testing method modifiers still work.
- __PACKAGE__->setup;
- our $MODIFIER_FIRED = 0;
-
- lives_ok {
- before 'dispatch' => sub { $MODIFIER_FIRED = 1 }
- } 'Can apply method modifier';
- no Moose;
-}
# that plugins don't get it wrong for us.
# Also tests method modifiers and etc in MyApp.pm still work as expected.
+use Test::More tests => 3;
+
+{
+ package NewTestPlugin;
+ use strict;
+ use warnings;
+ sub new {
+ my $class = shift;
+ return bless $_[0], $class;
+ }
+}
+
+{ # This is all in the same file so that the setup method on the
+ # application is called at runtime, rather than at compile time.
+ # This ensures that the end of scope hook has to happen at runtime
+ # correctly, otherwise the test will fail (ergo the switch from
+ # B::Hooks::EndOfScope to Sub::Uplevel)
+ package TestAppPluginWithNewMethod;
+ use Test::Exception;
+ use Catalyst qw/+NewTestPlugin/;
+
+ sub foo : Local {
+ my ($self, $c) = @_;
+ $c->res->body('foo');
+ }
+
+ use Moose; # Just testing method modifiers still work.
+ __PACKAGE__->setup;
+ our $MODIFIER_FIRED = 0;
+
+ lives_ok {
+ before 'dispatch' => sub { $MODIFIER_FIRED = 1 }
+ } 'Can apply method modifier';
+ no Moose;
+}
use FindBin;
-use lib "$FindBin::Bin/lib";use Test::More tests => 3;
+use lib "$FindBin::Bin/lib";
-use Catalyst::Test qw/TestAppPluginWithNewMethod/; # 1 test for adding a modifer not throwing.
+use Catalyst::Test qw/TestAppPluginWithNewMethod/;
ok request('/foo')->is_success;
is $TestAppPluginWithNewMethod::MODIFIER_FIRED, 1, 'Before modifier was fired correctly.';