[Catalyst-commits] r11991 - in Catalyst-Runtime/5.80/branches/better_scripts: . lib lib/Catalyst lib/Catalyst/Engine lib/Catalyst/Exception t t/aggregate t/author t/lib t/lib/Catalyst/Plugin/Test t/lib/TestApp/Controller t/lib/TestAppEncoding t/lib/TestAppEncoding/Controller

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Mon Nov 23 23:06:28 GMT 2009


Author: t0m
Date: 2009-11-23 23:06:27 +0000 (Mon, 23 Nov 2009)
New Revision: 11991

Added:
   Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/utf8_content_length.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/author/notabs.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/author/pod.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/author/podcoverage.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding.pm
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding/
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding/Controller/
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding/Controller/Root.pm
Removed:
   Catalyst-Runtime/5.80/branches/better_scripts/t/02pod.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/03podcoverage.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/04critic.t
Modified:
   Catalyst-Runtime/5.80/branches/better_scripts/
   Catalyst-Runtime/5.80/branches/better_scripts/Changes
   Catalyst-Runtime/5.80/branches/better_scripts/Makefile.PL
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/CGI.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/FastCGI.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Basic.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Detach.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Go.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Interface.pm
   Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Runtime.pm
   Catalyst-Runtime/5.80/branches/better_scripts/t/deprecated.t
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Deprecated.pm
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Plugin.pm
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestApp/Controller/Root.pm
   Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppPluginWithConstructor.pm
Log:
 r11978 at t0mlaptop (orig r11943):  rafl | 2009-11-20 06:22:44 +0000
 Fix a doc typo.
 
 Also trim some trailing whitespace.
 r11979 at t0mlaptop (orig r11944):  rafl | 2009-11-20 06:22:51 +0000
 Remove some docs for Exception::Go and ::Detach.
 
 Users really shouldn't care.
 r11980 at t0mlaptop (orig r11945):  rafl | 2009-11-20 07:05:08 +0000
 Depend on MX::Role::WithOverloading 0.03 to make sure things work out on 5.8.8 and older.
 r11986 at t0mlaptop (orig r11951):  rafl | 2009-11-21 01:30:07 +0000
 Remove duplicate changelog entry.
 r11987 at t0mlaptop (orig r11952):  rafl | 2009-11-21 01:43:12 +0000
 Improve Exception::Interface docs.
 r11988 at t0mlaptop (orig r11953):  rafl | 2009-11-21 01:43:28 +0000
 More changelogging.
 r11989 at t0mlaptop (orig r11954):  rafl | 2009-11-21 01:43:57 +0000
 Refer to the right ticket in Changes.
 r11990 at t0mlaptop (orig r11955):  rafl | 2009-11-21 02:31:02 +0000
 Version 5.80014.
 r11996 at t0mlaptop (orig r11961):  zby | 2009-11-21 13:03:43 +0000
 warning for plugins inheriting from Catayst::Component
 r11998 at t0mlaptop (orig r11963):  t0m | 2009-11-22 12:57:30 +0000
 Chop out that crap, not needed
 r11999 at t0mlaptop (orig r11964):  t0m | 2009-11-22 13:01:09 +0000
 Do not be @ISA Controller, that's hideous dumb and now warns
 r12000 at t0mlaptop (orig r11965):  t0m | 2009-11-22 13:01:48 +0000
 Do not use NEXT, like it says in the comments
 r12001 at t0mlaptop (orig r11966):  t0m | 2009-11-22 13:04:50 +0000
 Fix unicode issues in CGI and FastCGI engines
 r12002 at t0mlaptop (orig r11967):  t0m | 2009-11-22 13:08:47 +0000
 Changelog, adjust warning text, bump versions for a dev release. The 'we do get Class::C3::Adopt::NEXT warnings test is now broken, no idea why, will look later.
 r12003 at t0mlaptop (orig r11968):  t0m | 2009-11-22 19:42:30 +0000
 Different phrasing for different versions
 r12004 at t0mlaptop (orig r11969):  t0m | 2009-11-22 19:53:00 +0000
 Whoops, fix typo
 r12005 at t0mlaptop (orig r11970):  t0m | 2009-11-22 19:58:31 +0000
 It actually wants 'true', make that more explicit
 r12006 at t0mlaptop (orig r11971):  t0m | 2009-11-22 19:59:04 +0000
 release 5.80014_01
 r12008 at t0mlaptop (orig r11973):  t0m | 2009-11-22 20:08:28 +0000
 Notabs is author only
 r12009 at t0mlaptop (orig r11974):  t0m | 2009-11-22 20:11:17 +0000
 Pod tests are also author only
 r12010 at t0mlaptop (orig r11975):  t0m | 2009-11-22 20:13:06 +0000
 Changelog
 r12013 at t0mlaptop (orig r11978):  t0m | 2009-11-23 21:25:19 +0000
 Don't do bytes::length, just use length, tests to demonstrate the issue
 r12014 at t0mlaptop (orig r11979):  t0m | 2009-11-23 21:45:55 +0000
 Nasty hack for fastcgi, fixes gitalist
 r12021 at t0mlaptop (orig r11986):  t0m | 2009-11-23 22:57:40 +0000
 Have a new conflict statement



Property changes on: Catalyst-Runtime/5.80/branches/better_scripts
___________________________________________________________________
Name: svn:ignore
   - Catalyst-Runtime-*
META.yml
Makefile.old
.gdb_history
pm_to_blib
nytprof.out
blib
inc
Makefile
.*.swp

   + MANIFEST
MANIFEST.bak
Catalyst-Runtime-*
META.yml
Makefile.old
.gdb_history
pm_to_blib
nytprof.out
blib
inc
Makefile
.*.swp

Name: 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/disable_regex_fallback:11456
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/namespace_handling_refactor:10655
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/trunk:11919
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
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/disable_regex_fallback:11456
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/namespace_handling_refactor:10655
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/trunk:11986
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
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/better_scripts/Changes
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/Changes	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/Changes	2009-11-23 23:06:27 UTC (rev 11991)
@@ -1,5 +1,31 @@
 # This file documents the revision history for Perl extension Catalyst.
 
+  Bug fixes:
+   - Fix reporting the wrong Content-Length if the response body is an
+     upgraded string. Strings mean the same thing whether or not they are
+     upgraded, may get upgraded even after they are encoded, and will
+     produce the same output either way, but bytes::length returns too big
+     values for upgraded strings containing characters >127
+   - Make FastCGI compatible with modules which use the fileno call to
+     determine if a file is open (E.g. IPC::Run)
+
+  Refactoring / cleanups:
+   - NoTabs and Pod tests moved to t/author so that they're not run
+     (and then skipped) normally.
+
+5.80014_01 2009-11-22 20:01:23
+
+  Bug fixes:
+   - Filehandle now forced to binmode in CGI and FastCGI engines. This appears
+     to correct some UTF-8 issues, but may break people's code which relies
+     on the old behaviour.
+
+  Refactoring / cleanups:
+   - Plugins which inherit from Catalyst::Controller or Catalyst::Component
+     are deprecated and now issue warnings.
+
+5.80014 2009-11-21 02:51:14
+
    Bug fixes:
     - Require MooseX::MethodAttributes 0.17. This in turn requires new
       MooseX::Types to stop warnings in Moose 0.91, and correctly supports
@@ -9,8 +35,6 @@
     - Improved the suggested fix warning when component resolution uses regex
       fallback for fully qualified component names.
     - Catalyst::Test::local_request sets ->request on the response.
-    - Require HTTP::Request 5.814 and HTTP::Response 5.813 from LWP 5.814
-      to avoid test fails.
     - Log flush moved to the end of setup so that roles and plugins which
       hook setup_finalize can log things and have them appear in application
       startup, rather than with the first hit.
@@ -35,7 +59,7 @@
       context.
     - Pod fix in Catalyst::Request (RT#51490)
     - Pod fixes to refer to ::Controller:: rather than ::C:: as the latter
-      is deprecated (RT#51490)
+      is deprecated (RT#51489)
 
   New features:
     - Added disable_component_resolution_regex_fallback config option to
@@ -44,6 +68,11 @@
       proper PATH_INFO and SCRIPT_NAME processing for non-root applications
     - Enable Catalyst::Utils::home() to find home within Dist::Zilla built
       distributions
+    - Added the Catalyst::Exception::Interface role defining the interface
+      exception classes need to implement.
+    - Added Catalyst::Exception::Basic as a basic implementation of
+      Catalyst::Exception::Interface and made the existing exception classes
+      use it.
 
   Refactoring / cleanups:
     - Remove documentation for the case_sensitive setting

Modified: Catalyst-Runtime/5.80/branches/better_scripts/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/Makefile.PL	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/Makefile.PL	2009-11-23 23:06:27 UTC (rev 11991)
@@ -24,7 +24,7 @@
 requires 'Class::MOP' => '0.83';
 requires 'Moose' => '0.90';
 requires 'MooseX::MethodAttributes::Inheritable' => '0.17';
-requires 'MooseX::Role::WithOverloading';
+requires 'MooseX::Role::WithOverloading' => '0.03';
 requires 'Carp';
 requires 'Class::C3::Adopt::NEXT' => '0.07';
 requires 'CGI::Simple::Cookie';
@@ -114,6 +114,7 @@
 # NOTE - This is the version number of the _incompatible_ code,
 #        not the version number of the fixed version.
 my %conflicts = (
+    'Catalyst::Plugin::SubRequest' => '0.14',
     'Catalyst::Model::Akismet' => '0.02',
     'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
     'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
@@ -157,7 +158,7 @@
         my $attr = $osx_ver =~ /^10.(5|6)/  ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
 
         makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
-                                          qq{ echo "You must set the ENV variable $attr to true,"; }.
+                                          qq{ echo "You must set the ENV variable $attr to 'true',"; }.
                                           ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
     }
 }

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/CGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/CGI.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/CGI.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -85,6 +85,7 @@
     if ( $ENV{SERVER_PORT} == 443 ) {
         $request->secure(1);
     }
+    binmode(STDOUT); # Ensure we are sending bytes.
 }
 
 =head2 $self->prepare_headers($c)

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/FastCGI.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/FastCGI.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Engine/FastCGI.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -144,6 +144,11 @@
 
         $self->_fix_env( \%env );
 
+        # hack for perl libraries that use FILENO (e.g. IPC::Run)
+        # trying to patch FCGI.pm, but not got there yet :/
+        local *FCGI::Stream::FILENO = sub { -2 }
+            unless FCGI::Stream->can('FILENO');
+
         $class->handle_request( env => \%env );
 
         $proc_manager && $proc_manager->pm_post_dispatch();

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Basic.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Basic.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Basic.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -53,11 +53,11 @@
    package My::Exception;
    use Moose;
    use namespace::clean -except => 'meta';
-   
+
    with 'Catalyst::Exception::Basic';
-   
+
    # Elsewhere..
-   My::Exception::Basic->throw( qq/Fatal exception/ );
+   My::Exception->throw( qq/Fatal exception/ );
 
 See also L<Catalyst> and L<Catalyst::Exception>.
 
@@ -76,7 +76,7 @@
 
 =head2 as_string
 
-Stringifies the exception's message attribute. 
+Stringifies the exception's message attribute.
 Called when the object is stringified by overloading.
 
 =head2 throw( $message )

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Detach.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Detach.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Detach.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -19,28 +19,27 @@
 
 Catalyst::Exception::Detach - Exception for redispatching using $ctx->detach()
 
-=head1 SYNOPSIS
-
-   Do not use this class directly, instead you should use the singleton instance
-   found in $Catalyst::DETACH;
-   
-   E.g. die $Catalyst::DETACH
-   
-See also L<Catalyst> and L<Catalyst::Exception>.
-
 =head1 DESCRIPTION
 
 This is the class for the Catalyst Exception which is thrown then you call
-C<< $c->detach() >>. There should be a singleton instance of this class in the
-C<< $Catalyst::DETACH >> global variable.
+C<< $c->detach() >>.
 
-Users should never need to know or care about this exception, please just use
-C<< $c->detach >>
+This class is not intended to be used directly by users.
 
 =head2 meta
 
 Provided by Moose
 
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Catalyst>
+
+=item L<Catalyst::Exception>
+
+=back
+
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Go.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Go.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Go.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -19,28 +19,27 @@
 
 Catalyst::Exception::Go - Exception for redispatching using $ctx->go()
 
-=head1 SYNOPSIS
-
-   Do not use this class directly, instead you should use the singleton instance
-   found in $Catalyst::GO;
-   
-   E.g. die $Catalyst::GO;
-   
-See also L<Catalyst> and L<Catalyst::Exception>.
-
 =head1 DESCRIPTION
 
 This is the class for the Catalyst Exception which is thrown then you call
-C<< $c->go() >>. There should be a singleton instance of this class in the
-C<< $Catalyst::DETACH >> global variable.
+C<< $c->go() >>.
 
-Users should never need to know or care about this exception, please just use
-C<< $c->detach >>
+This class is not intended to be used directly by users.
 
 =head2 meta
 
 Provided by Moose
 
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Catalyst>
+
+=item L<Catalyst::Exception>
+
+=back
+
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Interface.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Interface.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Exception/Interface.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -15,23 +15,21 @@
 
 =head1 NAME
 
-Catalyst::Exception::Interface - Exception for redispatching using $ctx->detach()
+Catalyst::Exception::Interface - Role defining the interface for Catalyst exceptions
 
 =head1 SYNOPSIS
 
    package My::Catalyst::Like::Exception;
    use Moose;
    use namespace::clean -except => 'meta';
-   
+
+   with 'Catalyst::Exception::Interface';
+
    # This comprises the required interface.
    sub as_string { 'the exception text for stringification' }
    sub die { shift; die @_ }
    sub die { shift; die @_ }
-   
-   with 'Catalyst::Exception::Interface';
 
-See also L<Catalyst> and L<Catalyst::Exception>.
-
 =head1 DESCRIPTION
 
 This is a role for the required interface for Catalyst exceptions.
@@ -57,6 +55,16 @@
 
 Provided by Moose
 
+=head1 SEE ALSO
+
+=over 4
+
+=item L<Catalyst>
+
+=item L<Catalyst::Exception>
+
+=back
+
 =head1 AUTHORS
 
 Catalyst Contributors, see Catalyst.pm

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Runtime.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Runtime.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst/Runtime.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -7,7 +7,7 @@
 
 # Remember to update this in Catalyst as well!
 
-our $VERSION='5.80013';
+our $VERSION='5.80014_01';
 
 $VERSION = eval $VERSION;
 

Modified: Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/lib/Catalyst.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -4,7 +4,6 @@
 use Moose::Meta::Class ();
 extends 'Catalyst::Component';
 use Moose::Util qw/find_meta/;
-use bytes;
 use B::Hooks::EndOfScope ();
 use Catalyst::Exception;
 use Catalyst::Exception::Detach;
@@ -79,7 +78,7 @@
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.80013';
+our $VERSION = '5.80014_01';
 
 {
     my $dev_version = $VERSION =~ /_\d{2}$/;
@@ -1793,7 +1792,7 @@
         }
         else {
             # everything should be bytes at this point, but just in case
-            $response->content_length( bytes::length( $response->body ) );
+            $response->content_length( length( $response->body ) );
         }
     }
 
@@ -2587,7 +2586,8 @@
         my $class = ref $proto || $proto;
 
         Class::MOP::load_class( $plugin );
-
+        $class->log->warn( "$plugin inherits from 'Catalyst::Component' - this is decated and will not work in 5.81" )
+            if $plugin->isa( 'Catalyst::Component' );
         $proto->_plugins->{$plugin} = 1;
         unless ($instant) {
             no strict 'refs';

Deleted: Catalyst-Runtime/5.80/branches/better_scripts/t/02pod.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/02pod.t	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/02pod.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -1,7 +0,0 @@
-use Test::More;
-
-eval "use Test::Pod 1.14";
-plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD} || -e 'inc/.author';
-
-all_pod_files_ok();

Deleted: Catalyst-Runtime/5.80/branches/better_scripts/t/03podcoverage.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/03podcoverage.t	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/03podcoverage.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -1,13 +0,0 @@
-use Test::More;
-
-eval "use Pod::Coverage 0.19";
-plan skip_all => 'Pod::Coverage 0.19 required' if $@;
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD} || -e 'inc/.author';
-
-all_pod_coverage_ok(
-  { 
-    also_private => ['BUILD']
-  }
-);

Deleted: Catalyst-Runtime/5.80/branches/better_scripts/t/04critic.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/04critic.t	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/04critic.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -1,21 +0,0 @@
-use strict;
-use warnings;
-
-use File::Spec;
-use FindBin ();
-use Test::More;
-
-if ( !-e "$FindBin::Bin/../MANIFEST.SKIP" ) {
-    plan skip_all => 'Critic test only for developers.';
-}
-else {
-    eval { require Test::NoTabs };
-    if ( $@ ) {
-        plan tests => 1;
-        fail( 'You must install Test::NoTabs to run 04critic.t' );
-        exit;
-    }
-}
-
-Test::NoTabs->import;
-all_perl_files_ok(qw/lib/);

Added: Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/utf8_content_length.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/utf8_content_length.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/utf8_content_length.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -0,0 +1,30 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/../lib";
+use File::Spec;
+use Test::More;
+
+use Catalyst::Test qw/TestAppEncoding/;
+
+if ( $ENV{CATALYST_SERVER} ) {
+    plan skip_all => 'This test does not run live';
+    exit 0;
+}
+
+my $fn = "$Bin/../catalyst_130pix.gif";
+ok -r $fn, 'Can read catalyst_130pix.gif';
+my $size = -s $fn;
+{
+    my $r = request('/binary');
+    is $r->code, 200, '/binary OK';
+    is $r->header('Content-Length'), $size, '/binary correct content length';
+}
+{
+    my $r = request('/binary_utf8');
+    is $r->code, 200, '/binary_utf8 OK';
+    is $r->header('Content-Length'), $size, '/binary_utf8 correct content length';
+}
+
+done_testing;
+

Copied: Catalyst-Runtime/5.80/branches/better_scripts/t/author/notabs.t (from rev 10642, Catalyst-Runtime/5.80/branches/better_scripts/t/04critic.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/author/notabs.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/author/notabs.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+
+use File::Spec;
+use FindBin ();
+use Test::More;
+use Test::NoTabs;
+
+all_perl_files_ok(qw/lib/);
+

Copied: Catalyst-Runtime/5.80/branches/better_scripts/t/author/pod.t (from rev 10642, Catalyst-Runtime/5.80/branches/better_scripts/t/02pod.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/author/pod.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/author/pod.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -0,0 +1,8 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Test::Pod 1.14;
+
+all_pod_files_ok();
+

Copied: Catalyst-Runtime/5.80/branches/better_scripts/t/author/podcoverage.t (from rev 10642, Catalyst-Runtime/5.80/branches/better_scripts/t/03podcoverage.t)
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/author/podcoverage.t	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/author/podcoverage.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -0,0 +1,13 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Pod::Coverage 0.19;
+use Test::Pod::Coverage 1.04;
+
+all_pod_coverage_ok(
+  {
+    also_private => ['BUILD']
+  }
+);
+

Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/deprecated.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/deprecated.t	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/deprecated.t	2009-11-23 23:06:27 UTC (rev 11991)
@@ -9,7 +9,10 @@
 my $warnings;
 BEGIN { # Do this at compile time in case we generate a warning when use
         # DeprecatedTestApp
-    $SIG{__WARN__} = sub { $warnings++ if $_[0] =~ /trying to use NEXT/ };
+    $SIG{__WARN__} = sub {
+        $warnings++ if $_[0] =~ /uses NEXT, which is deprecated/;
+        $warnings++ if $_[0] =~ /trying to use NEXT, which is deprecated/;
+    };
 }
 use Catalyst; # Cause catalyst to be used so I can fiddle with the logging.
 my $mvc_warnings;

Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Deprecated.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Deprecated.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Deprecated.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -2,7 +2,6 @@
 
 use strict;
 use warnings;
-use NEXT;
 
 sub prepare {
     my $class = shift;

Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Plugin.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Plugin.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/lib/Catalyst/Plugin/Test/Plugin.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -4,7 +4,7 @@
 use warnings;
 use MRO::Compat;
 
-use base qw/Catalyst::Controller Class::Data::Inheritable/;
+use base qw/Class::Data::Inheritable/;
 
  __PACKAGE__->mk_classdata('ran_setup');
 

Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestApp/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestApp/Controller/Root.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestApp/Controller/Root.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -1,5 +1,6 @@
 package TestApp::Controller::Root;
-
+use strict;
+use warnings;
 use base 'Catalyst::Controller';
 
 __PACKAGE__->config->{namespace} = '';

Added: Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding/Controller/Root.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding/Controller/Root.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding/Controller/Root.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -0,0 +1,27 @@
+package TestAppEncoding::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+use Test::More;
+
+__PACKAGE__->config->{namespace} = '';
+
+sub binary : Local {
+    my ($self, $c) = @_;
+    $c->res->body(do { open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; local $/ = undef; <$fh>; });
+}
+
+sub binary_utf8 : Local {
+    my ($self, $c) = @_;
+    $c->forward('binary');
+    my $str = $c->res->body;
+    utf8::upgrade($str);
+    ok utf8::is_utf8($str), 'Body is variable width encoded string';
+    $c->res->body($str);
+}
+
+sub end : Private {
+    my ($self,$c) = @_;
+}
+
+1;

Added: Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding.pm	                        (rev 0)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppEncoding.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -0,0 +1,11 @@
+package TestAppEncoding;
+use strict;
+use warnings;
+use base qw/Catalyst/;
+use Catalyst;
+
+__PACKAGE__->config(name => __PACKAGE__);
+__PACKAGE__->setup;
+
+1;
+

Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppPluginWithConstructor.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppPluginWithConstructor.pm	2009-11-23 23:02:44 UTC (rev 11990)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/lib/TestAppPluginWithConstructor.pm	2009-11-23 23:06:27 UTC (rev 11991)
@@ -4,7 +4,7 @@
 use Test::Exception;
 use Catalyst qw/+TestPluginWithConstructor/;
 use Moose;
-BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME.
+extends qw/Catalyst/;
 
 __PACKAGE__->setup;
 our $MODIFIER_FIRED = 0;




More information about the Catalyst-commits mailing list