Hello community,

here is the log from the commit of package perl-Router-Simple for 
openSUSE:Factory checked in at 2015-04-15 16:23:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Router-Simple (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Router-Simple.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Router-Simple"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Router-Simple/perl-Router-Simple.changes    
2013-10-06 14:56:09.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Router-Simple.new/perl-Router-Simple.changes   
    2015-04-15 16:23:18.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr 13 19:07:42 UTC 2015 - [email protected]
+
+- updated to 0.17
+   see /usr/share/doc/packages/perl-Router-Simple/Changes
+
+-------------------------------------------------------------------

Old:
----
  Router-Simple-0.15.tar.gz

New:
----
  Router-Simple-0.17.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Router-Simple.spec ++++++
--- /var/tmp/diff_new_pack.utxWGO/_old  2015-04-15 16:23:18.000000000 +0200
+++ /var/tmp/diff_new_pack.utxWGO/_new  2015-04-15 16:23:18.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Router-Simple
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,10 +17,10 @@
 
 
 Name:           perl-Router-Simple
-Version:        0.15
+Version:        0.17
 Release:        0
 %define cpan_name Router-Simple
-Summary:        Simple HTTP router
+Summary:        simple HTTP router
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Router-Simple/
@@ -29,8 +29,6 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(CPAN::Meta)
-BuildRequires:  perl(CPAN::Meta::Prereqs)
 BuildRequires:  perl(Class::Accessor::Lite) >= 0.05
 BuildRequires:  perl(Module::Build) >= 0.38
 BuildRequires:  perl(Test::More) >= 0.98
@@ -63,6 +61,6 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Changes cpanfile LICENSE minil.toml README.md
+%doc Changes LICENSE minil.toml README.md
 
 %changelog

++++++ Router-Simple-0.15.tar.gz -> Router-Simple-0.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/Build.PL 
new/Router-Simple-0.17/Build.PL
--- old/Router-Simple-0.15/Build.PL     2013-09-29 04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/Build.PL     2014-12-02 07:58:37.000000000 +0100
@@ -12,8 +12,6 @@
 use Module::Build;
 use File::Basename;
 use File::Spec;
-use CPAN::Meta;
-use CPAN::Meta::Prereqs;
 
 my %args = (
     license              => 'perl',
@@ -33,6 +31,8 @@
 
     test_files           => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') 
? 't/ xt/' : 't/',
     recursive_test_files => 1,
+
+
 );
 if (-d 'share') {
     $args{share_dir} = 'share';
@@ -51,20 +51,15 @@
 )->new(%args);
 $builder->create_build_script();
 
-my $mbmeta = CPAN::Meta->load_file('MYMETA.json');
-my $meta = CPAN::Meta->load_file('META.json');
-my $prereqs_hash = CPAN::Meta::Prereqs->new(
-    $meta->prereqs
-)->with_merged_prereqs(
-    CPAN::Meta::Prereqs->new($mbmeta->prereqs)
-)->as_string_hash;
-my $mymeta = CPAN::Meta->new(
-    {
-        %{$meta->as_struct},
-        prereqs => $prereqs_hash
-    }
-);
-print "Merging cpanfile prereqs to MYMETA.yml\n";
-$mymeta->save('MYMETA.yml', { version => 1.4 });
-print "Merging cpanfile prereqs to MYMETA.json\n";
-$mymeta->save('MYMETA.json', { version => 2 });
+use File::Copy;
+
+print "cp META.json MYMETA.json\n";
+copy("META.json","MYMETA.json") or die "Copy failed(META.json): $!";
+
+if (-f 'META.yml') {
+    print "cp META.yml MYMETA.yml\n";
+    copy("META.yml","MYMETA.yml") or die "Copy failed(META.yml): $!";
+} else {
+    print "There is no META.yml... You may install this module from the 
repository...\n";
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/Changes 
new/Router-Simple-0.17/Changes
--- old/Router-Simple-0.15/Changes      2013-09-29 04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/Changes      2014-12-02 07:58:37.000000000 +0100
@@ -1,4 +1,27 @@
-Revision history for Perl extension Router::Simple
+Revision history for Perl module Router::Simple
+
+0.17 2014-12-02T06:58:23Z
+
+    commit 35bb954a60cdd9225858b522f118d5851f69e3ce
+    Author: Maurice Aubrey <[email protected]>
+    Date:   Fri Nov 21 15:19:59 2014 -0800
+
+        support nested submappers
+
+0.16 2014-10-27T01:39:47Z
+
+    commit 4cce76f681517d9ae10d2509899bf0e9abd4db5d
+    commit 47ca5b5141b2ae863b62989755e5f3a17edf37df
+    Author: Fayland Lam <[email protected]>
+    Date:   Sun Oct 26 17:44:51 2014 +0800
+
+        Added directory_slash option.
+
+    commit 379502c868db3bd37c3518e288d64223d4012417
+    Author: Neil Bowers <[email protected]>
+    Date:   Wed Oct 2 23:35:04 2013 +0100
+
+        Reformatted as per CPAN::Changes::Spec
 
 0.15 2013-09-29T02:29:15Z
 
@@ -7,82 +30,86 @@
     - typo fix
       (David Steinbrunner)
 
-0.14
+0.14 2012-12-05
+
+    - added 'routes' acecessor for Router::Simple class.
+      And switch to Class::Accessor::Lite.
 
-        - added 'routes' acecessor for Router::Simple class.
-          And switch to Class::Accessor::Lite.
+0.13 2012-10-26
 
-0.13
+    - Added ->method_not_allowed()
 
-        - Added ->method_not_allowed()
+0.12 2012-10-25
 
-0.12
+    - minor pod fix
+      (book++)
 
-        - minor pod fix
-          (book++)
+0.11 2012-10-23
 
-0.11
+    - Added warnings when regexp contains parens.
+      i.e. following code does not works.
+      /{year:(\d+)}/{month:(\d+)}{day:(\d+)}
 
-        - Added warnings when regexp contains parens.
-          i.e. following code does not works.
-          /{year:(\d+)}/{month:(\d+)}{day:(\d+)}
+    Q. Why don't you croak?
+    A. I don't want to break existed code.
+       But I may change this feature in future version.
 
-          Q. Why don't you croak?
-          A. I don't want to break existed code.
-             But I may change this feature in future version.
+       (reported by ktat++)
 
-          (reported by ktat++)
+0.10 2012-10-10
+
+    - handle empty PATH_INFO as root
+      (tokuhirom)
 
-0.10
+0.09 2011-05-14
 
-        - handle empty PATH_INFO as root
-          (tokuhirom)
+    - modernize package (no feature changes)
 
-0.09
+0.08 2011-02-16
 
-        - modernize package(no feature changes)
+    - fix "Can't use an undefined value as a HASH reference" error
+      for $route->{dest}
+      (tomi-ru++)
 
-0.08
+0.07 2010-09-02
 
-        - fix "Can't use an undefined value as a HASH reference" error for 
$route->{dest}
-          (tomi-ru++)
+    - modified to allow to use extended regexp (?:including ":" - colon)
+      as pattern
+      (nipotan)
 
-0.07
+0.06 2010-06-14
 
-        - modified to allow to use extended regexp (?:including ":" - colon) 
as pattern
-          (nipotan)
+    - require Test::More 0.88 or later for using done_testing.
+      (reported by kazeburo++)
 
-0.06
+0.05 2010-03-21
 
-        - require Test::More 0.88 or later for using done_testing.
-          (reported by kazeburo++)
+    [FEATURE ENHANCEMENTS]
+    - added Router::Simple::Route->match($env) method.
+    - added $route->routematch() method.
 
-0.05
+    [INCOMPATIBLE CHANGES]
+    - remove url_for().
 
-        [FEATURE ENHANCEMENTS]
-        - added Router::Simple::Route->match($env) method.
-        - added $route->routematch() method.
+0.04 2010-03-20
 
-        [INCOMPATIBLE CHANGES]
-        - remove url_for().
+    (no feature changes)
+    - some doc fixed(miyagawa++)
+    - added test case(miyagawa++)
 
-0.04
+0.03 2010-03-19
 
-        (no feature changes)
-        - some doc fixed(miyagawa++)
-        - added test case(miyagawa++)
+    [INCOMPATIBLE CHANGES]
+    - make 'submapper' as more consistent.
+    - ->match() returns flat hashref(suggested by miyagawa++)
+    - added 'on_match' callback function(suggested by miyagawa++)
+    - ->connect() does not treat any keys in $destination.
 
-0.03
+0.02 2010-03-19
 
-        [INCOMPATIBLE CHANGES]
-        - make 'submapper' as more consistent.
-        - ->match() returns flat hashref(suggested by miyagawa++)
-        - added 'on_match' callback function(suggested by miyagawa++)
-        - ->connect() does not treat any keys in $destination.
+    - fixed english docs(Sartak++)
 
-0.02
+0.01 2010-03-19
 
-        - fixed english docs(Sartak++)
+    - original version
 
-0.01    Wed Mar 17 08:36:14 2010
-        - original version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/MANIFEST 
new/Router-Simple-0.17/MANIFEST
--- old/Router-Simple-0.15/MANIFEST     2013-09-29 04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/MANIFEST     2014-12-02 07:58:37.000000000 +0100
@@ -23,6 +23,7 @@
 t/11_ext_regexp.t
 t/12_paren_warnings.t
 t/13_method_not_allowed.t
+t/14_ending_slash.t
 xt/02_perlcritic.t
 xt/04_synopsis.t
 META.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/META.json 
new/Router-Simple-0.17/META.json
--- old/Router-Simple-0.15/META.json    2013-09-29 04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/META.json    2014-12-02 07:58:37.000000000 +0100
@@ -4,7 +4,7 @@
       "Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Minilla/v0.6.7",
+   "generated_by" : "Minilla/v2.1.1",
    "license" : [
       "perl_5"
    ],
@@ -21,21 +21,21 @@
          "share",
          "eg",
          "examples",
-         "author"
+         "author",
+         "builder"
       ]
    },
    "prereqs" : {
       "configure" : {
          "requires" : {
-            "CPAN::Meta" : "0",
-            "CPAN::Meta::Prereqs" : "0",
             "Module::Build" : "0.38"
          }
       },
       "develop" : {
          "requires" : {
             "Test::CPAN::Meta" : "0",
-            "Test::MinimumVersion" : "0.10108",
+            "Test::MinimumVersion::Fast" : "0.04",
+            "Test::PAUSE::Permissions" : "0.04",
             "Test::Pod" : "1.41",
             "Test::Spellunker" : "v0.2.7"
          }
@@ -58,7 +58,7 @@
    "provides" : {
       "Router::Simple" : {
          "file" : "lib/Router/Simple.pm",
-         "version" : "0.15"
+         "version" : "0.17"
       },
       "Router::Simple::Declare" : {
          "file" : "lib/Router/Simple/Declare.pm"
@@ -81,7 +81,7 @@
          "web" : "https://github.com/tokuhirom/p5-router-simple";
       }
    },
-   "version" : "0.15",
+   "version" : "0.17",
    "x_contributors" : [
       "Shawn M Moore <[email protected]>",
       "Tatsuhiko Miyagawa <[email protected]>",
@@ -89,6 +89,9 @@
       "Naoki Tomita <[email protected]>",
       "Philippe Bruhat (BooK) <[email protected]>",
       "David Steinbrunner <[email protected]>",
-      "tokuhirom <[email protected]>"
+      "Neil Bowers <[email protected]>",
+      "Fayland Lam <[email protected]>",
+      "Maurice Aubrey <[email protected]>",
+      "Tokuhiro Matsuno <[email protected]>"
    ]
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/META.yml 
new/Router-Simple-0.17/META.yml
--- old/Router-Simple-0.15/META.yml     2013-09-29 04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/META.yml     2014-12-02 07:58:37.000000000 +0100
@@ -3,17 +3,15 @@
 author:
   - 'Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>'
 build_requires:
-  Test::More: 0.98
+  Test::More: '0.98'
 configure_requires:
-  CPAN::Meta: 0
-  CPAN::Meta::Prereqs: 0
-  Module::Build: 0.38
+  Module::Build: '0.38'
 dynamic_config: 0
-generated_by: 'Minilla/v0.6.7, CPAN::Meta::Converter version 2.132510'
+generated_by: 'Minilla/v2.1.1, CPAN::Meta::Converter version 2.141520'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Router-Simple
 no_index:
   directory:
@@ -24,10 +22,11 @@
     - eg
     - examples
     - author
+    - builder
 provides:
   Router::Simple:
     file: lib/Router/Simple.pm
-    version: 0.15
+    version: '0.17'
   Router::Simple::Declare:
     file: lib/Router/Simple/Declare.pm
   Router::Simple::Route:
@@ -35,16 +34,16 @@
   Router::Simple::SubMapper:
     file: lib/Router/Simple/SubMapper.pm
 requires:
-  Class::Accessor::Lite: 0.05
-  List::Util: 0
-  Scalar::Util: 0
-  parent: 0
+  Class::Accessor::Lite: '0.05'
+  List::Util: '0'
+  Scalar::Util: '0'
+  parent: '0'
   perl: 5.008_001
 resources:
   bugtracker: https://github.com/tokuhirom/p5-router-simple/issues
   homepage: https://github.com/tokuhirom/p5-router-simple
   repository: git://github.com/tokuhirom/p5-router-simple.git
-version: 0.15
+version: '0.17'
 x_contributors:
   - 'Shawn M Moore <[email protected]>'
   - 'Tatsuhiko Miyagawa <[email protected]>'
@@ -52,4 +51,7 @@
   - 'Naoki Tomita <[email protected]>'
   - 'Philippe Bruhat (BooK) <[email protected]>'
   - 'David Steinbrunner <[email protected]>'
-  - 'tokuhirom <[email protected]>'
+  - 'Neil Bowers <[email protected]>'
+  - 'Fayland Lam <[email protected]>'
+  - 'Maurice Aubrey <[email protected]>'
+  - 'Tokuhiro Matsuno <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/README.md 
new/Router-Simple-0.17/README.md
--- old/Router-Simple-0.15/README.md    2013-09-29 04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/README.md    2014-12-02 07:58:37.000000000 +0100
@@ -30,7 +30,7 @@
 
 # HOW TO WRITE A ROUTING RULE
 
-## plain string 
+## plain string
 
     $router->connect( '/foo', { controller => 'Root', action => 'foo' } );
 
@@ -108,11 +108,11 @@
 
     - method
 
-        'method' is an ArrayRef\[String\] or String that matches 
__REQUEST\_METHOD__ in $req.
+        'method' is an ArrayRef\[String\] or String that matches 
**REQUEST\_METHOD** in $req.
 
     - host
 
-        'host' is a String or Regexp that matches __HTTP\_HOST__ in $req.
+        'host' is a String or Regexp that matches **HTTP\_HOST** in $req.
 
     - on\_match
 
@@ -142,7 +142,7 @@
 
         $router->submapper('/entry/', {controller => 'Entry'})
 
-    This method is shorthand for creating new instance of 
[Router::Simple::Submapper](http://search.cpan.org/perldoc?Router::Simple::Submapper).
+    This method is shorthand for creating new instance of 
[Router::Simple::Submapper](https://metacpan.org/pod/Router::Simple::Submapper).
 
     The arguments will be passed to `Router::Simple::SubMapper->new(%args)`.
 
@@ -150,7 +150,7 @@
 
     Matches a URL against one of the contained routes.
 
-    The parameter is either a [PSGI](http://search.cpan.org/perldoc?PSGI) $env 
or a plain string that
+    The parameter is either a [PSGI](https://metacpan.org/pod/PSGI) $env or a 
plain string that
     represents a path.
 
     This method returns a plain hashref that would look like:
@@ -168,7 +168,7 @@
     Match a URL against one of the routes contained.
 
     Will return undef if no valid match is found, otherwise a
-    result hashref and a 
[Router::Simple::Route](http://search.cpan.org/perldoc?Router::Simple::Route) 
object is returned.
+    result hashref and a 
[Router::Simple::Route](https://metacpan.org/pod/Router::Simple::Route) object 
is returned.
 
 - `$router->as_string()`
 
@@ -198,13 +198,13 @@
 
 Router::Simple is inspired by [routes.py](http://routes.groovie.org/).
 
-[Path::Dispatcher](http://search.cpan.org/perldoc?Path::Dispatcher) is 
similar, but so complex.
+[Path::Dispatcher](https://metacpan.org/pod/Path::Dispatcher) is similar, but 
so complex.
 
-[Path::Router](http://search.cpan.org/perldoc?Path::Router) is heavy. It 
depends on [Moose](http://search.cpan.org/perldoc?Moose).
+[Path::Router](https://metacpan.org/pod/Path::Router) is heavy. It depends on 
[Moose](https://metacpan.org/pod/Moose).
 
-[HTTP::Router](http://search.cpan.org/perldoc?HTTP::Router) has many 
dependencies. It is not well documented.
+[HTTP::Router](https://metacpan.org/pod/HTTP::Router) has many dependencies. 
It is not well documented.
 
-[HTTPx::Dispatcher](http://search.cpan.org/perldoc?HTTPx::Dispatcher) is my 
old one. It does not provide an OO-ish interface.
+[HTTPx::Dispatcher](https://metacpan.org/pod/HTTPx::Dispatcher) is my old one. 
It does not provide an OO-ish interface.
 
 # THANKS TO
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/lib/Router/Simple/Route.pm 
new/Router-Simple-0.17/lib/Router/Simple/Route.pm
--- old/Router-Simple-0.15/lib/Router/Simple/Route.pm   2013-09-29 
04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/lib/Router/Simple/Route.pm   2014-12-02 
07:58:37.000000000 +0100
@@ -63,6 +63,8 @@
                     quotemeta($4);
                 }
             !gex;
+            # for example, pattern '/comment/' will both match '/comment/' and 
'/comment'
+            $pattern .= '?' if $opt->{directory_slash} and $pattern =~ m{\/$};
             qr{^$pattern$};
         }
     };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/lib/Router/Simple/SubMapper.pm 
new/Router-Simple-0.17/lib/Router/Simple/SubMapper.pm
--- old/Router-Simple-0.15/lib/Router/Simple/SubMapper.pm       2013-09-29 
04:29:29.000000000 +0200
+++ new/Router-Simple-0.17/lib/Router/Simple/SubMapper.pm       2014-12-02 
07:58:37.000000000 +0100
@@ -2,6 +2,7 @@
 use strict;
 use warnings;
 use Scalar::Util qw/weaken/;
+use Router::Simple ();
 
 sub new {
     my ($class, %args) = @_;
@@ -25,6 +26,14 @@
     $self; # chained method
 }
 
+# Allow nested submapper calls
+sub submapper {
+    my $self = shift;
+
+    Router::Simple::submapper($self, @_);
+}
+
+
 1;
 __END__
 
@@ -62,6 +71,12 @@
 
 This method returns $submapper itself for method-chain.
 
+=item $submapper->submapper(%args)
+
+submapper() can be called recursively to build nested routes.
+
+This method returns $submapper itself for method-chain.
+
 =back
 
 =head1 SEE ALSO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/lib/Router/Simple.pm 
new/Router-Simple-0.17/lib/Router/Simple.pm
--- old/Router-Simple-0.15/lib/Router/Simple.pm 2013-09-29 04:29:29.000000000 
+0200
+++ new/Router-Simple-0.17/lib/Router/Simple.pm 2014-12-02 07:58:37.000000000 
+0100
@@ -2,24 +2,33 @@
 use strict;
 use warnings;
 use 5.00800;
-our $VERSION = '0.15';
+our $VERSION = '0.17';
 use Router::Simple::SubMapper;
 use Router::Simple::Route;
 use List::Util qw/max/;
 use Carp ();
 
 use Class::Accessor::Lite 0.05 (
-    ro => [qw(routes)],
+    new => 1,
+    ro => [qw(routes directory_slash)],
 );
 
 our $_METHOD_NOT_ALLOWED;
 
-sub new {
-    bless {routes => []}, shift;
-}
-
 sub connect {
     my $self = shift;
+
+    if ($self->{directory_slash}) {
+        # connect([$name, ]$pattern[, \%dest[, \%opt]])
+        if (@_ == 1 || ref $_[1]) {
+            unshift(@_, undef);
+        }
+
+        # \%opt
+        $_[3] ||= {};
+        $_[3]->{directory_slash} = 1;
+    }
+
     my $route = Router::Simple::Route->new(@_);
     push @{ $self->{routes} }, $route;
     return $self;
@@ -126,7 +135,7 @@
 
 =head1 HOW TO WRITE A ROUTING RULE
 
-=head2 plain string 
+=head2 plain string
 
     $router->connect( '/foo', { controller => 'Root', action => 'foo' } );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/t/06_submapper.t 
new/Router-Simple-0.17/t/06_submapper.t
--- old/Router-Simple-0.15/t/06_submapper.t     2013-09-29 04:29:29.000000000 
+0200
+++ new/Router-Simple-0.17/t/06_submapper.t     2014-12-02 07:58:37.000000000 
+0100
@@ -6,7 +6,11 @@
 my $r = Router::Simple->new();
 $r->submapper('/account', {controller => 'Account'})
       ->connect('/login', {action => 'login'})
-      ->connect('/logout', {action => 'logout'});
+      ->connect('/logout', {action => 'logout'})
+      ->submapper('/profile') # nested submapper
+          ->connect('/show', {action => 'profile_show'})
+;
+
 $r->submapper('/entry/{id:[0-9]+}', {controller => 'Entry'})
       ->connect('/show', {action => 'show'})
       ->connect('/edit', {action => 'edit'});
@@ -18,6 +22,15 @@
         action     => 'login',
     }
 );
+
+is_deeply(
+    $r->match( +{ PATH_INFO => '/account/profile/show', HTTP_HOST => 
'localhost', REQUEST_METHOD => 'GET' } ) || undef,
+    {
+        controller => 'Account',
+        action     => 'profile_show',
+    }
+);
+
 is_deeply(
     $r->match( +{ PATH_INFO => '/entry/49/edit', HTTP_HOST => 'localhost', 
REQUEST_METHOD => 'GET' } ) || undef,
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Router-Simple-0.15/t/14_ending_slash.t 
new/Router-Simple-0.17/t/14_ending_slash.t
--- old/Router-Simple-0.15/t/14_ending_slash.t  1970-01-01 01:00:00.000000000 
+0100
+++ new/Router-Simple-0.17/t/14_ending_slash.t  2014-12-02 07:58:37.000000000 
+0100
@@ -0,0 +1,52 @@
+use strict;
+use warnings;
+use Router::Simple;
+use Test::More;
+
+my $r = Router::Simple->new({ directory_slash => 1 });
+$r->connect('blog_monthly', '/blog/{year}/{month}/', {controller => 'Blog', 
action => 'monthly'}, {method => 'GET'});
+$r->connect('/blog/{year:\d{1,4}}/{month:\d{2}}/{day:\d\d}/', {controller => 
'Blog', action => 'daily'}, {method => 'GET'});
+$r->connect('/comment/', {controller => 'Comment', 'action' => 'create'}, 
{method => 'POST'});
+$r->connect('/:controller/:action/');
+
+foreach my $es ('', '/') {
+    is_deeply(
+        $r->match( +{ PATH_INFO => '/blog/2010/03' . $es, HTTP_HOST => 
'localhost', REQUEST_METHOD => 'GET' } ) || undef,
+        {
+            controller => 'Blog',
+            action     => 'monthly',
+            year => 2010,
+            month => '03'
+        },
+        'blog monthly'
+    );
+    is_deeply(
+        $r->match( +{ PATH_INFO => '/blog/2010/03/04' . $es, HTTP_HOST => 
'localhost', REQUEST_METHOD => 'GET' } ) || undef,
+        {
+            controller => 'Blog',
+            action     => 'daily',
+            year => 2010, month => '03', day => '04',
+        },
+        'daily'
+    );
+    is_deeply(
+        $r->match( +{ PATH_INFO => '/blog/2010/03' . $es, HTTP_HOST => 
'localhost', REQUEST_METHOD => 'POST' } ) || undef,
+        undef
+    );
+    is_deeply(
+        $r->match( +{ PATH_INFO => '/comment' . $es, HTTP_HOST => 'localhost', 
REQUEST_METHOD => 'POST' } ) || undef,
+        {
+            controller => 'Comment',
+            action     => 'create',
+        }
+    );
+    is_deeply(
+        $r->match( +{ PATH_INFO => '/foo/bar' . $es, HTTP_HOST => 'localhost', 
REQUEST_METHOD => 'GET' } ) || undef,
+        {
+            controller => 'foo',
+            action     => 'bar',
+        }
+    );
+}
+
+done_testing;


Reply via email to