Merge branch 'master' into gsoc_breadboard
André Walker [Sat, 20 Oct 2012 04:30:19 +0000 (01:30 -0300)]
Conflicts:
lib/Catalyst.pm
t/aggregate/unit_core_mvc.t

1  2 
Makefile.PL
lib/Catalyst.pm
lib/Catalyst/Controller.pm
t/aggregate/unit_core_mvc.t

diff --cc Makefile.PL
@@@ -67,9 -67,8 +68,9 @@@ requires 'MRO::Compat'
  requires 'MooseX::Getopt' => '0.30';
  requires 'MooseX::Types';
  requires 'MooseX::Types::Common::Numeric';
 +requires 'MooseX::Types::LoadableClass';
  requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
- requires 'Plack' => '0.9974'; # IIS6 fix middleware
+ requires 'Plack' => '0.9991'; # IIS6+7 fix middleware
  requires 'Plack::Middleware::ReverseProxy' => '0.04';
  requires 'Plack::Test::ExternalServer';
  
diff --cc lib/Catalyst.pm
@@@ -141,18 -135,9 +143,18 @@@ sub import 
      $caller->setup_home;
  }
  
 +sub MODIFY_CODE_ATTRIBUTES {
 +    Catalyst::Exception->throw(
 +        "Catalyst applications (aka MyApp) cannot be controllers anymore. " .
 +        "That has been deprecated and removed. You should create a " .
 +        "controller class called Root.pm, and move relevant code to that class."
 +    );
 +}
 +
 +
  sub _application { $_[0] }
  
- =encoding utf8
+ =encoding UTF-8
  
  =head1 NAME
  
Simple merge
@@@ -33,28 -14,22 +33,34 @@@ Moose::Meta::Class->create
  
      use base qw/Catalyst/;
  
 -    __PACKAGE__->components( { map { ( ref($_)||$_ , $_ ) } @complist } );
 +    no warnings 'redefine';
  
 -    my $thingie={};
 -    bless $thingie, 'Some::Test::Object';
 -    __PACKAGE__->components->{'MyMVCTestApp::Model::Test::Object'} = $thingie;
 +    local *Catalyst::IOC::Container::build_locate_components_service = sub {
 +        my $self = shift;
  
 -    # allow $c->log->warn to work
 -    __PACKAGE__->setup_log;
 +        return Bread::Board::BlockInjection->new(
 +            lifecycle => 'Singleton',
 +            name      => 'locate_components',
 +            block     => sub {
 +                return [@complist, 'MyMVCTestApp::Model::Test::Object'];
 +
 +            },
 +        );
 +    };
 +    local *Catalyst::Log::warn = sub { $warnings++ };
 +
 +    __PACKAGE__->setup;
  }
  
 +ok( $warnings, 'Issues deprecated warnings' );
 +is( @{[ MyMVCTestApp->component_list ]}, scalar @complist + 1, 'Loaded all components' );
 +
+ {
+     package MyStringThing;
+     use overload '""' => sub { $_[0]->{string} }, fallback => 1;
+ }
  is( MyMVCTestApp->view('View'), 'MyMVCTestApp::V::View', 'V::View ok' );
  
  is( MyMVCTestApp->controller('Controller'),