[Catalyst-commits] r13477 - in
Catalyst-Runtime/5.80/branches/gsoc_breadboard: . lib
lib/Catalyst lib/Catalyst/Engine t t/aggregate t/lib
t/lib/TestApp/Controller/Moose
arcanez at dev.catalyst.perl.org
arcanez at dev.catalyst.perl.org
Fri Aug 6 02:03:50 GMT 2010
Author: arcanez
Date: 2010-08-06 03:03:50 +0100 (Fri, 06 Aug 2010)
New Revision: 13477
Added:
Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestApp/Controller/Moose/NoAttributes.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/unit_core_methodattributes_method_metaclass_on_subclasses.t
Modified:
Catalyst-Runtime/5.80/branches/gsoc_breadboard/
Catalyst-Runtime/5.80/branches/gsoc_breadboard/Changes
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine/CGI.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Runtime.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Utils.pm
Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/aggregate/unit_core_engine_cgi-prepare_path.t
Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/custom_exception_class_simple.t
Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestAppClassExceptionSimpleTest.pm
Log:
r1844 at warpedreality (orig r13380): arcanez | 2010-07-02 17:04:07 -0700
remove extra '
r1846 at warpedreality (orig r13407): hobbs | 2010-07-09 02:40:44 -0700
Try harder to make finalize_error encoding-safe.
r1865 at warpedreality (orig r13441): t0m | 2010-07-28 14:39:41 -0700
r15666 at spaceinvaders (orig r13357): jnapiorkowski | 2010-06-16 20:12:46 +0100
new branch
r15667 at spaceinvaders (orig r13358): jnapiorkowski | 2010-06-16 20:55:08 +0100
broke out and documented action_class method
r15749 at spaceinvaders (orig r13440): t0m | 2010-07-28 22:39:32 +0100
Changelog
r1870 at warpedreality (orig r13446): t0m | 2010-07-28 15:00:14 -0700
r15662 at spaceinvaders (orig r13353): t0m | 2010-06-15 22:15:31 +0100
Branch for rt58057
r15663 at spaceinvaders (orig r13354): t0m | 2010-06-15 22:17:32 +0100
Commit standalone test, test which makes the TestApp blow up and the nasty workaround
r15726 at spaceinvaders (orig r13417): t0m | 2010-07-23 13:29:21 +0100
I know hobbs has a patch to add a load of these, but we should at least add (es)
r15753 at spaceinvaders (orig r13444): t0m | 2010-07-28 22:56:25 +0100
Entirely the wrong branch, idiot. Remove r13417
r15754 at spaceinvaders (orig r13445): t0m | 2010-07-28 23:00:05 +0100
Document the horrible, changelog. I'm going to merge this and fix a real issue as I don't have time to fuck around inside Moose right now and it's been waiting way too long already
r1871 at warpedreality (orig r13447): t0m | 2010-07-28 15:26:21 -0700
Fix TODO tests.
r1872 at warpedreality (orig r13448): t0m | 2010-07-28 15:26:31 -0700
Whitespace
r1875 at warpedreality (orig r13451): t0m | 2010-07-28 15:53:56 -0700
r13095 at spaceinvaders (orig r13059): caelum | 2010-03-22 09:27:45 +0000
branch to fix running under CGI on IIS
r13097 at spaceinvaders (orig r13061): caelum | 2010-03-22 10:40:52 +0000
fix for CGI on IIS
r15759 at spaceinvaders (orig r13450): t0m | 2010-07-28 23:52:15 +0100
Changelog
r1879 at warpedreality (orig r13455): t0m | 2010-07-28 17:58:32 -0700
Version 5.80025
r1881 at warpedreality (orig r13457): zarquon | 2010-07-29 03:26:51 -0700
advertise Catalyst::Plugin::SmartURI
r1882 at warpedreality (orig r13458): zarquon | 2010-07-29 03:28:09 -0700
stupid typo
r1886 at warpedreality (orig r13468): lukes | 2010-08-04 07:25:18 -0700
moved component name sort that happens in setup_components to locate_components to allow methods to wrap around locate_components
r1888 at warpedreality (orig r13470): rbuels | 2010-08-04 13:04:14 -0700
don't load Catalyst::Exception in Utils.pm BEGIN, because some Scripts::* load Utils before MyApp.pm, meaning that ::Exception::CATALYST_EXCEPTION_CLASS in MyApp.pm will not be respected
Property changes on: Catalyst-Runtime/5.80/branches/gsoc_breadboard
___________________________________________________________________
Modified: svk:merge
- 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/aggregate_more:11803
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/better_scripts:12074
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/disable_regex_fallback:11456
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_path_info_decoding:12089
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_request_uri:13262
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/more_metaclass_compat:13280
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/param_filtering:13012
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2:11811
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_for_utf8:12834
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-better_scripts:11331
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-mech_tests:15583
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
+ 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/compres:7999
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/branches/context_go:8001
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:8533
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/Catalyst-Test-Updates:8363
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/add_captures_to_visit:9546
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/aggregate_more:11803
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/better_scripts:12074
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/disable_regex_fallback:11456
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_iis_cgi:13450
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_path_info_decoding:12089
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/fix_request_uri:13262
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/index_default_fuckage:10646
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7911
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/more_metaclass_compat:13280
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/namespace_handling_refactor:10655
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/param_filtering:13012
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/rt58057:13445
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/tweak_controller_action_creation:13440
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_encode_captures_andor_args_take2:11811
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/uri_for_utf8:12834
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/trunk:13470
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-better_scripts:11331
6d45476b-5895-46b8-b13a-8b969fa34c98:/local/Catalyst-Runtime-mech_tests:15583
8a9521aa-ff93-41d6-9f87-b05cafcdab40:/local/cat/Catalyst-Runtime/5.80/trunk:8157
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/Changes 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/Changes 2010-08-06 02:03:50 UTC (rev 13477)
@@ -1,8 +1,19 @@
# This file documents the revision history for Perl extension Catalyst.
+5.80025 2010-07-29 01:50:00
+
+ New features:
+ - An 'action_class' method has been added to Catalyst::Controller to
+ allow controller base classes, roles or traits
+ (e.g. Catalyst::Controller::ActionRole) to more easily override
+ the default action creation.
+
Bug fixes:
- Fix the --mech and --mechanize options to the myapp_create.pl script
to operate correctly by fixing the options passed down into the script.
+ - Fix controllers with no method attributes (where the action definitions
+ are entirely contained in config). RT#58057
+ - Fix running as a CGI under IIS at non-root locations.
Documentation:
- Fix missing - in the docs when describing the --mechanize option at one
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Controller.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Controller.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -225,7 +225,9 @@
foreach my $method (@methods) {
my $name = $method->name;
- my $attributes = $method->attributes;
+ # Horrible hack! All method metaclasses should have an attributes
+ # method, core Moose bug - see r13354.
+ my $attributes = $method->can('attributes') ? $method->attributes : [];
my $attrs = $self->_parse_attrs( $c, $name, @{ $attributes } );
if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) {
$c->log->debug( 'Bad action definition "'
@@ -248,16 +250,25 @@
}
}
-sub create_action {
+sub action_class {
my $self = shift;
my %args = @_;
my $class = (exists $args{attributes}{ActionClass}
- ? $args{attributes}{ActionClass}[0]
- : $self->_action_class);
+ ? $args{attributes}{ActionClass}[0]
+ : $self->_action_class);
+
Class::MOP::load_class($class);
+ return $class;
+}
+sub create_action {
+ my $self = shift;
+ my %args = @_;
+
+ my $class = $self->action_class(%args);
my $action_args = $self->config->{action_args};
+
my %extra_args = (
%{ $action_args->{'*'} || {} },
%{ $action_args->{ $args{name} } || {} },
@@ -529,6 +540,11 @@
Creates action objects for a set of action methods using C< create_action >,
and registers them with the dispatcher.
+=head2 $self->action_class(%args)
+
+Used when a controller is creating an action to determine the correct base
+action class to use.
+
=head2 $self->create_action(%args)
Called with a hash of data to be use for construction of a new
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine/CGI.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine/CGI.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -154,6 +154,12 @@
my $scheme = $c->request->secure ? 'https' : 'http';
my $host = $ENV{HTTP_HOST} || $ENV{SERVER_NAME};
my $port = $ENV{SERVER_PORT} || 80;
+
+ # fix up for IIS
+ if ($ENV{SERVER_SOFTWARE} && $ENV{SERVER_SOFTWARE} =~ m{IIS/[6-9]\.\d}) {
+ $ENV{PATH_INFO} =~ s/^\Q$ENV{SCRIPT_NAME}\E//;
+ }
+
my $script_name = $ENV{SCRIPT_NAME};
$script_name =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go if $script_name;
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Engine.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -10,6 +10,8 @@
use HTTP::Body;
use HTTP::Headers;
use URI::QueryParam;
+use Encode ();
+use utf8;
use namespace::clean -except => 'meta';
@@ -131,7 +133,15 @@
$c->res->content_type('text/html; charset=utf-8');
my $name = ref($c)->config->{name} || join(' ', split('::', ref $c));
+
+ # Prevent Catalyst::Plugin::Unicode::Encoding from running.
+ # This is a little nasty, but it's the best way to be clean whether or
+ # not the user has an encoding plugin.
+ if ($c->can('encoding')) {
+ $c->{encoding} = '';
+ }
+
my ( $title, $error, $infos );
if ( $c->debug ) {
@@ -279,11 +289,12 @@
</body>
</html>
-
# Trick IE. Old versions of IE would display their own error page instead
# of ours if we'd give it less than 512 bytes.
$c->res->{body} .= ( ' ' x 512 );
+ $c->res->{body} = Encode::encode("UTF-8", $c->res->{body});
+
# Return 500
$c->res->status(500);
}
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Runtime.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Runtime.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Runtime.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -7,7 +7,7 @@
# Remember to update this in Catalyst as well!
-our $VERSION = '5.80024';
+our $VERSION = '5.80025';
=head1 NAME
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Utils.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Utils.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst/Utils.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -1,7 +1,6 @@
package Catalyst::Utils;
use strict;
-use Catalyst::Exception;
use File::Spec;
use HTTP::Request;
use Path::Class;
@@ -140,6 +139,13 @@
eval { $tmpdir->mkpath };
if ($@) {
+ # don't load Catalyst::Exception as a BEGIN in Utils,
+ # because Utils often gets loaded before MyApp.pm, and if
+ # Catalyst::Exception is loaded before MyApp.pm, it does
+ # not honor setting
+ # $Catalyst::Exception::CATALYST_EXCEPTION_CLASS in
+ # MyApp.pm
+ require Catalyst::Exception;
Catalyst::Exception->throw(
message => qq/Couldn't create tmpdir '$tmpdir', "$@"/ );
}
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -79,7 +79,7 @@
# Remember to update this in Catalyst::Runtime as well!
-our $VERSION = '5.80024';
+our $VERSION = '5.80025';
sub import {
my ( $class, @arguments ) = @_;
@@ -892,7 +892,7 @@
For example:
MyApp->config({ 'Model::Foo' => { bar => 'baz', overrides => 'me' } });
- MyApp::Model::Foo->config({ quux => 'frob', 'overrides => 'this' });
+ MyApp::Model::Foo->config({ quux => 'frob', overrides => 'this' });
will mean that C<MyApp::Model::Foo> receives the following data when
constructed:
@@ -1243,7 +1243,9 @@
Constructs an absolute L<URI> object based on the application root, the
provided path, and the additional arguments and query parameters provided.
-When used as a string, provides a textual URI.
+When used as a string, provides a textual URI. If you need more flexibility
+than this (i.e. the option to provide relative URIs etc.) see
+L<Catalyst::Plugin::SmartURI>.
If no arguments are provided, the URI for the current action is returned.
To return the current action and also provide @args, use
@@ -2435,8 +2437,7 @@
my $config = $class->config->{ setup_components };
- my @comps = sort { length $a <=> length $b }
- $class->locate_components($config);
+ my @comps = $class->locate_components($config);
my %comps = map { $_ => 1 } @comps;
my $deprecatedcatalyst_component_names = grep { /::[CMV]::/ } @comps;
@@ -2496,7 +2497,8 @@
%$config
);
- my @comps = $locator->plugins;
+ # XXX think about ditching this sort entirely
+ my @comps = sort { length $a <=> length $b } $locator->plugins;
return @comps;
}
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/aggregate/unit_core_engine_cgi-prepare_path.t
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/aggregate/unit_core_engine_cgi-prepare_path.t 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/aggregate/unit_core_engine_cgi-prepare_path.t 2010-08-06 02:03:50 UTC (rev 13477)
@@ -86,8 +86,20 @@
is ''.$r->base, 'http://www.foo.com/oslobilder/', 'base correct';
}
+# CGI hit on IIS for non / based app
{
- local $TODO = 'Another mod_rewrite case';
+ my $r = get_req(0,
+ SERVER_SOFTWARE => 'Microsoft-IIS/6.0',
+ PATH_INFO => '/bobtfish/Gitalist/script/gitalist.cgi/static/css/blueprint/screen.css',
+ SCRIPT_NAME => '/bobtfish/Gitalist/script/gitalist.cgi',
+ PATH_TRANSLATED =>
+'C:\\Inetpub\\vhosts\\foo.com\\httpdocs\\bobtfish\\Gitalist\\script\\gitalist.cgi\\static\\css\\blueprint\\screen.css',
+ );
+ is ''.$r->uri, 'http://www.foo.com/bobtfish/Gitalist/script/gitalist.cgi/static/css/blueprint/screen.css';
+ is ''.$r->base, 'http://www.foo.com/bobtfish/Gitalist/script/gitalist.cgi/';
+}
+
+{
my $r = get_req (0,
PATH_INFO => '/auth/login',
SCRIPT_NAME => '/tx',
@@ -113,7 +125,6 @@
is $r->base, 'http://www.foo.com/', 'Base is correct';
}
-
# FIXME - Test proxy logic
# - Test query string
# - Test non standard port numbers
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/custom_exception_class_simple.t
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/custom_exception_class_simple.t 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/custom_exception_class_simple.t 2010-08-06 02:03:50 UTC (rev 13477)
@@ -4,9 +4,17 @@
use warnings;
use FindBin qw/$Bin/;
use lib "$Bin/lib";
-use Test::More tests => 1;
+use Test::More tests => 2;
use Test::Exception;
lives_ok {
require TestAppClassExceptionSimpleTest;
} 'Can load application';
+
+
+lives_ok {
+ Catalyst::Exception->throw
+} 'throw is properly stubbed out';
+
+
+
Added: Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestApp/Controller/Moose/NoAttributes.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestApp/Controller/Moose/NoAttributes.pm (rev 0)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestApp/Controller/Moose/NoAttributes.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -0,0 +1,16 @@
+package TestApp::Controller::Moose::NoAttributes;
+use Moose;
+extends qw/Catalyst::Controller/;
+
+__PACKAGE__->config(
+ actions => {
+ test => { Local => undef }
+ }
+);
+
+sub test {
+}
+
+no Moose;
+1;
+
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestAppClassExceptionSimpleTest.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestAppClassExceptionSimpleTest.pm 2010-08-05 20:00:10 UTC (rev 13476)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/lib/TestAppClassExceptionSimpleTest.pm 2010-08-06 02:03:50 UTC (rev 13477)
@@ -10,6 +10,8 @@
use strict;
use warnings;
+use Catalyst::Utils; #< some of the scripts use Catalyst::Utils before MyApp.pm
+
BEGIN { $Catalyst::Exception::CATALYST_EXCEPTION_CLASS = 'TestAppClassExceptionSimpleTest::Exception'; }
use Catalyst;
Added: Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/unit_core_methodattributes_method_metaclass_on_subclasses.t
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/unit_core_methodattributes_method_metaclass_on_subclasses.t (rev 0)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/t/unit_core_methodattributes_method_metaclass_on_subclasses.t 2010-08-06 02:03:50 UTC (rev 13477)
@@ -0,0 +1,30 @@
+use strict;
+use Test::More;
+
+{
+ package NoAttributes::CT;
+ use Moose;
+ BEGIN { extends qw/Catalyst::Controller/; };
+
+ sub test {}
+}
+{
+ package NoAttributes::RT;
+ use Moose;
+ extends qw/Catalyst::Controller/;
+
+ sub test {}
+}
+
+foreach my $class (qw/ CT RT /) {
+ my $class_name = 'NoAttributes::' . $class;
+ my $meta = $class_name->meta;
+ my $meth = $meta->find_method_by_name('test');
+ {
+ local $TODO = "Known MX::MethodAttributes issue";
+ ok $meth->can('attributes'), 'method metaclass has ->attributes method for ' . $class;;
+ }
+}
+
+done_testing;
+
More information about the Catalyst-commits
mailing list