[Catalyst-commits] r6179 - in trunk/Catalyst-Plugin-OrderedParams: . lib/Catalyst/Plugin

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Wed Mar 21 07:04:13 GMT 2007


Author: andyg
Date: 2007-03-21 07:04:10 +0000 (Wed, 21 Mar 2007)
New Revision: 6179

Modified:
   trunk/Catalyst-Plugin-OrderedParams/Changes
   trunk/Catalyst-Plugin-OrderedParams/META.yml
   trunk/Catalyst-Plugin-OrderedParams/Makefile.PL
   trunk/Catalyst-Plugin-OrderedParams/lib/Catalyst/Plugin/OrderedParams.pm
Log:
OrderedParams: Fixed compatibility with Catalyst 5.7007

Modified: trunk/Catalyst-Plugin-OrderedParams/Changes
===================================================================
--- trunk/Catalyst-Plugin-OrderedParams/Changes	2007-03-20 19:51:18 UTC (rev 6178)
+++ trunk/Catalyst-Plugin-OrderedParams/Changes	2007-03-21 07:04:10 UTC (rev 6179)
@@ -1,5 +1,8 @@
 Revision history for Perl extension Catalyst::Plugin::OrderedParams
 
+0.06    2007-03-20 23:25:00
+        - Fixed compatibility with Catalyst 5.7007.
+
 0.05    2005-11-17 12:00:00
         - Replaced Text::ASCIITable with Text::SimpleTable.
         - Fixed 01use.t.

Modified: trunk/Catalyst-Plugin-OrderedParams/META.yml
===================================================================
--- trunk/Catalyst-Plugin-OrderedParams/META.yml	2007-03-20 19:51:18 UTC (rev 6178)
+++ trunk/Catalyst-Plugin-OrderedParams/META.yml	2007-03-21 07:04:10 UTC (rev 6179)
@@ -1,15 +1,20 @@
 ---
 name: Catalyst-Plugin-OrderedParams
-version: 0.05
+version: 0.06
 author:
   - 'Andy Grundman, <andy at hybridized.org>'
 abstract: Maintain order of submitted form parameters
 license: perl
+resources:
+  license: http://dev.perl.org/licenses/
 requires:
   Catalyst: 5.30
   Tie::Hash::Indexed: 0
 provides:
   Catalyst::Plugin::OrderedParams:
     file: lib/Catalyst/Plugin/OrderedParams.pm
-    version: 0.05
-generated_by: Module::Build version 0.2611
+    version: 0.06
+generated_by: Module::Build version 0.2806
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.2.html
+  version: 1.2

Modified: trunk/Catalyst-Plugin-OrderedParams/Makefile.PL
===================================================================
--- trunk/Catalyst-Plugin-OrderedParams/Makefile.PL	2007-03-20 19:51:18 UTC (rev 6178)
+++ trunk/Catalyst-Plugin-OrderedParams/Makefile.PL	2007-03-21 07:04:10 UTC (rev 6179)
@@ -17,15 +17,15 @@
       
       # Save this 'cause CPAN will chdir all over the place.
       my $cwd = Cwd::cwd();
-      my $makefile = File::Spec->rel2abs($0);
       
-      CPAN::Shell->install('Module::Build::Compat')
-	or die " *** Cannot install without Module::Build.  Exiting ...\n";
+      CPAN::Shell->install('Module::Build::Compat');
+      CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
+	or die "Couldn't install Module::Build, giving up.\n";
       
       chdir $cwd or die "Cannot chdir() back to $cwd: $!";
     }
     eval "use Module::Build::Compat 0.02; 1" or die $@;
-    use lib '_build/lib';
+    
     Module::Build::Compat->run_build_pl(args => \@ARGV);
     require Module::Build;
     Module::Build::Compat->write_makefile(build_class => 'Module::Build');

Modified: trunk/Catalyst-Plugin-OrderedParams/lib/Catalyst/Plugin/OrderedParams.pm
===================================================================
--- trunk/Catalyst-Plugin-OrderedParams/lib/Catalyst/Plugin/OrderedParams.pm	2007-03-20 19:51:18 UTC (rev 6178)
+++ trunk/Catalyst-Plugin-OrderedParams/lib/Catalyst/Plugin/OrderedParams.pm	2007-03-21 07:04:10 UTC (rev 6179)
@@ -8,7 +8,7 @@
     require HTTP::Body;
 }
 
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 sub prepare_request {
     my $c = shift;
@@ -41,9 +41,14 @@
     
     # due to complex interactions in 5.5 this method has to be overridden
     # instead of extended.
+    
+    if ( defined $c->request->{_body} ) {
+        # We may not have a body to process if it was a GET request
+        return if !ref $c->request->{_body};
 
-    # have we already built the object?
-    return if defined $c->request->{_body}->{ordered};
+        # have we already built the object?
+        return if defined $c->request->{_body}->{ordered};
+    }
 
     # for 5.5+, we create a new HTTP::Body instance with indexed hashes.
     my $length = $c->req->header('Content-Length') || 0;




More information about the Catalyst-commits mailing list