r58198 - in /branches/upstream/libapache-session-wrapper-perl/current: Changes META.yml lib/Apache/Session/Wrapper.pm

ansgar-guest at users.alioth.debian.org ansgar-guest at users.alioth.debian.org
Fri May 21 19:04:20 UTC 2010


Author: ansgar-guest
Date: Fri May 21 19:04:11 2010
New Revision: 58198

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58198
Log:
[svn-upgrade] Integrating new upstream version, libapache-session-wrapper-perl (0.34)

Modified:
    branches/upstream/libapache-session-wrapper-perl/current/Changes
    branches/upstream/libapache-session-wrapper-perl/current/META.yml
    branches/upstream/libapache-session-wrapper-perl/current/lib/Apache/Session/Wrapper.pm

Modified: branches/upstream/libapache-session-wrapper-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-session-wrapper-perl/current/Changes?rev=58198&op=diff
==============================================================================
--- branches/upstream/libapache-session-wrapper-perl/current/Changes (original)
+++ branches/upstream/libapache-session-wrapper-perl/current/Changes Fri May 21 19:04:11 2010
@@ -1,3 +1,14 @@
+0.34    2010-05-20
+
+- Rerelease 0.33_01 as 0.34
+
+0.33_01   2009-12-31
+
+- Fix user defined options handling and fix default of optional options.
+  See http://rt.cpan.org/Public/Bug/Display.html?id=49561.
+- Trap possibly clobbered $@.
+- New maintainer.
+
 0.33   2006-09-26
 
 - When setting up tests with Apache::Test, if the user has apache2 we

Modified: branches/upstream/libapache-session-wrapper-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-session-wrapper-perl/current/META.yml?rev=58198&op=diff
==============================================================================
--- branches/upstream/libapache-session-wrapper-perl/current/META.yml (original)
+++ branches/upstream/libapache-session-wrapper-perl/current/META.yml Fri May 21 19:04:11 2010
@@ -1,27 +1,28 @@
----
-name: Apache-Session-Wrapper
-version: 0.33
-author:
-  - 'Dave Rolsky, <autarch at urth.org>'
-abstract: A simple wrapper around Apache::Session
-license: perl
-resources:
-  license: http://dev.perl.org/licenses/
+--- #YAML:1.0
+name:               Apache-Session-Wrapper
+version:            0.34
+abstract:           ~
+author:  []
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-  Apache::Session: 1.81
-  Class::Container: 0
-  Exception::Class: 0
-  Params::Validate: 0.7
-  Scalar::Util: 0
-build_requires:
-  File::Spec: 0
-  File::Temp: 0
-  Module::Build: 0
-provides:
-  Apache::Session::Wrapper:
-    file: lib/Apache/Session/Wrapper.pm
-    version: 0.33
-generated_by: Module::Build version 0.2801
+    Apache::Session:   1.81
+    Class::Container:  0
+    Exception::Class:  0
+    File::Spec:        0
+    File::Temp:        0
+    Module::Build:     0
+    Params::Validate:  0.7
+    Scalar::Util:      0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
-  url: http://module-build.sourceforge.net/META-spec-v1.2.html
-  version: 1.2
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libapache-session-wrapper-perl/current/lib/Apache/Session/Wrapper.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-session-wrapper-perl/current/lib/Apache/Session/Wrapper.pm?rev=58198&op=diff
==============================================================================
--- branches/upstream/libapache-session-wrapper-perl/current/lib/Apache/Session/Wrapper.pm (original)
+++ branches/upstream/libapache-session-wrapper-perl/current/lib/Apache/Session/Wrapper.pm Fri May 21 19:04:11 2010
@@ -4,7 +4,8 @@
 
 use vars qw($VERSION);
 
-$VERSION = '0.33';
+$VERSION = '0.34';
+$VERSION = eval $VERSION;
 
 use base qw(Class::Container);
 
@@ -311,7 +312,22 @@
     {
         for my $p ( map { @$_ } map { @$_ } values %$hash )
         {
-            $extra{$p} = { optional => 1 };
+            my $h;
+            if ( ref $p ) {
+                # we assume its a hash of names/parameter specifications
+                $h = $p;
+            } elsif (!$params{$p}) {
+                # its a new parameter defined by a scalar, default to SCALAR value
+                $h = { $p => { optional => 1, type => SCALAR } };
+            } else {
+                # its a scalar option we already know.
+                next;
+            }
+            # now expand the options
+            foreach my $name (keys %$h) {
+                next if $params{$name};
+                $extra{$p} = $h->{$name};
+            }
         }
     }
 
@@ -350,7 +366,7 @@
     my $class = shift;
     my %p = validate( @_, { name => { type => SCALAR },
                             required => { type => SCALAR | ARRAYREF, default => [ [ ] ] },
-                            optional => { type => SCALAR | ARRAYREF, default => [ [ ] ] },
+                            optional => { type => SCALAR | ARRAYREF, default => [ ] },
                           },
                     );
 
@@ -378,7 +394,7 @@
                                     },
                             name => { type => SCALAR },
                             required => { type => SCALAR | ARRAYREF, default => [ [ ] ] },
-                            optional => { type => SCALAR | ARRAYREF, default => [ [ ] ] },
+                            optional => { type => SCALAR | ARRAYREF, default => [ ]  },
                           },
                     );
 
@@ -701,7 +717,7 @@
     else
     {
         my $error =
-            $@ ? $@ : "Tying to Apache::Session::$self->{session_class_piece} failed but did not throw an exception";
+            $err ? $err : "Tying to Apache::Session::$self->{session_class_piece} failed but did not throw an exception";
         die $error;
     }
 }




More information about the Pkg-perl-cvs-commits mailing list