r63226 - in /branches/upstream/libcatalyst-perl/current: ./ lib/ lib/Catalyst/ t/aggregate/ t/lib/ t/lib/TestApp/Controller/ t/lib/TestAppViewWarnings/ t/lib/TestAppViewWarnings/Controller/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Oct 3 17:44:29 UTC 2010
Author: jawnsy-guest
Date: Sun Oct 3 17:44:18 2010
New Revision: 63226
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63226
Log:
[svn-upgrade] new version libcatalyst-perl (5.80029)
Added:
branches/upstream/libcatalyst-perl/current/t/aggregate/live_view_warnings.t
branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/
branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings.pm
branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/Controller/
branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/Controller/Root.pm
Modified:
branches/upstream/libcatalyst-perl/current/Changes
branches/upstream/libcatalyst-perl/current/MANIFEST
branches/upstream/libcatalyst-perl/current/META.yml
branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm
branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm
branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup.t
branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup_stats.t
branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Anon.pm
Modified: branches/upstream/libcatalyst-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/Changes?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/Changes (original)
+++ branches/upstream/libcatalyst-perl/current/Changes Sun Oct 3 17:44:18 2010
@@ -1,4 +1,15 @@
# This file documents the revision history for Perl extension Catalyst.
+
+5.80029 2010-10-03 16:39:00
+
+ New features:
+ - Add a warning when $c->view is called and cannot locate a default_view
+ or current_view. This clarifies the logging when ::RenderView gets
+ confused.
+
+ Warning fixes:
+ - Deal warning in with Moose >= 1.15 if you add a method called 'meta' to a
+ class which already has one by using _add_meta_method.
5.80028 2010-09-28 20:49:00
Modified: branches/upstream/libcatalyst-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/MANIFEST?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/MANIFEST (original)
+++ branches/upstream/libcatalyst-perl/current/MANIFEST Sun Oct 3 17:44:18 2010
@@ -125,6 +125,7 @@
t/aggregate/live_plugin_loaded.t
t/aggregate/live_priorities.t
t/aggregate/live_recursion.t
+t/aggregate/live_view_warnings.t
t/aggregate/meta_method_unneeded.t
t/aggregate/unit_controller_actions.t
t/aggregate/unit_controller_config.t
@@ -334,6 +335,8 @@
t/lib/TestAppStats/Controller/Root.pm
t/lib/TestAppToTestScripts.pm
t/lib/TestAppUnknownError.pm
+t/lib/TestAppViewWarnings.pm
+t/lib/TestAppViewWarnings/Controller/Root.pm
t/lib/TestAppWithMeta.pm
t/lib/TestAppWithMeta/Controller/Root.pm
t/lib/TestPluginWithConstructor.pm
Modified: branches/upstream/libcatalyst-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/META.yml?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/META.yml (original)
+++ branches/upstream/libcatalyst-perl/current/META.yml Sun Oct 3 17:44:18 2010
@@ -69,4 +69,4 @@
homepage: http://dev.catalyst.perl.org/
license: http://dev.perl.org/licenses/
repository: http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/
-version: 5.80028
+version: 5.80029
Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst.pm Sun Oct 3 17:44:18 2010
@@ -79,7 +79,7 @@
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.80028';
+our $VERSION = '5.80029';
sub import {
my ( $class, @arguments ) = @_;
@@ -100,7 +100,12 @@
$meta->superclasses(grep { $_ ne 'Moose::Object' } $meta->superclasses);
unless( $meta->has_method('meta') ){
- $meta->add_method(meta => sub { Moose::Meta::Class->initialize("${caller}") } );
+ if ($Moose::VERSION >= 1.15) {
+ $meta->_add_meta_method('meta');
+ }
+ else {
+ $meta->add_method(meta => sub { Moose::Meta::Class->initialize("${caller}") } );
+ }
}
$caller->arguments( [@arguments] );
@@ -745,7 +750,12 @@
unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
my $comps = $c->components;
my $check = $appclass."::View::".$name;
- return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+ if( exists $comps->{$check} ) {
+ return $c->_filter_component( $comps->{$check}, @args );
+ }
+ else {
+ $c->log->warn( "Attempted to use view '$check', but does not exist" );
+ }
}
my @result = $c->_comp_search_prefixes( $name, qw/View V/ );
return map { $c->_filter_component( $_, @args ) } @result if ref $name;
Modified: branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm (original)
+++ branches/upstream/libcatalyst-perl/current/lib/Catalyst/Runtime.pm Sun Oct 3 17:44:18 2010
@@ -7,7 +7,7 @@
# Remember to update this in Catalyst as well!
-our $VERSION = '5.80028';
+our $VERSION = '5.80029';
=head1 NAME
Added: branches/upstream/libcatalyst-perl/current/t/aggregate/live_view_warnings.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/aggregate/live_view_warnings.t?rev=63226&op=file
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/aggregate/live_view_warnings.t (added)
+++ branches/upstream/libcatalyst-perl/current/t/aggregate/live_view_warnings.t Sun Oct 3 17:44:18 2010
@@ -1,0 +1,23 @@
+#!perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+use Test::More;
+use Catalyst::Test 'TestAppViewWarnings';
+
+if ( $ENV{CATALYST_SERVER} ) {
+ plan skip_all => 'Using remote server';
+}
+
+{
+ ok( my $response = request('http://localhost/'), 'Request' );
+ like($TestAppViewWarnings::log_messages[0], qr/Attempted to use view/s, 'View failure warning received');
+
+}
+
+done_testing;
+
Modified: branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup.t?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup.t (original)
+++ branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup.t Sun Oct 3 17:44:18 2010
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Class::MOP::Class;
+use Class::MOP;
use Catalyst::Runtime;
use Test::More tests => 29;
Modified: branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup_stats.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup_stats.t?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup_stats.t (original)
+++ branches/upstream/libcatalyst-perl/current/t/aggregate/unit_core_setup_stats.t Sun Oct 3 17:44:18 2010
@@ -2,7 +2,7 @@
use warnings;
use Test::More tests => 5;
-use Class::MOP::Class;
+use Class::MOP;
use Catalyst ();
Modified: branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Anon.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Anon.pm?rev=63226&op=diff
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Anon.pm (original)
+++ branches/upstream/libcatalyst-perl/current/t/lib/TestApp/Controller/Anon.pm Sun Oct 3 17:44:18 2010
@@ -25,7 +25,6 @@
# Special move as the methodattributes trait has changed our metaclass..
$meta = find_meta($meta->name);
- $meta->add_method('meta' => sub { $meta });
$class = $meta->name;
$class->new($app, $args);
}
Added: branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings.pm?rev=63226&op=file
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings.pm (added)
+++ branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings.pm Sun Oct 3 17:44:18 2010
@@ -1,0 +1,22 @@
+use strict;
+use warnings;
+
+package TestAppViewWarnings;
+
+use Catalyst;
+
+our @log_messages;
+
+__PACKAGE__->config( name => 'TestAppWarnings', root => '/some/dir', default_view => "DoesNotExist" );
+
+__PACKAGE__->log(TestAppViewWarnings::Log->new);
+
+__PACKAGE__->setup;
+
+package TestAppViewWarnings::Log;
+
+use base qw/Catalyst::Log/;
+sub warn { push(@TestAppViewWarnings::log_messages, @_[1..$#_]); }
+
+1;
+
Added: branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/Controller/Root.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/Controller/Root.pm?rev=63226&op=file
==============================================================================
--- branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/Controller/Root.pm (added)
+++ branches/upstream/libcatalyst-perl/current/t/lib/TestAppViewWarnings/Controller/Root.pm Sun Oct 3 17:44:18 2010
@@ -1,0 +1,17 @@
+package TestAppViewWarnings::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+# Return log messages from previous request
+sub index :Path Args() {}
+
+sub end : Action {
+ my ($self, $c) = @_;
+ $c->view; # Cause view lookup and ergo warning we are testing.
+ $c->res->body('foo');
+}
+
+1;
More information about the Pkg-perl-cvs-commits
mailing list