diff --git a/Build.PL b/Build.PL index 9fcc715..369cdf1 100644 --- a/Build.PL +++ b/Build.PL @@ -12,8 +12,6 @@ use utf8; use Module::Build; use File::Basename; use File::Spec; -use CPAN::Meta; -use CPAN::Meta::Prereqs; my %args = ( license => 'perl', @@ -33,7 +31,8 @@ my %args = ( test_files => ((-d '.git' || $ENV{RELEASE_TESTING}) && -d 'xt') ? 't/ xt/' : 't/', recursive_test_files => 1, - + + ); if (-d 'share') { $args{share_dir} = 'share'; @@ -52,20 +51,15 @@ my $builder = Module::Build->subclass( )->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 --git a/Changes b/Changes index de98bb2..72ab087 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,10 @@ Revision history for perl module Routes::Tiny {{$NEXT}} + - captures now return all captures from all children (Jonathan R. Warden) + - fix bug: correct parent of match on sub-subroute (Jonathan R. Warden) + - PSGI example + 0.14 2014-01-07T08:09:27Z - Just meta files update diff --git a/META.json b/META.json index eae38dc..75e046e 100644 --- a/META.json +++ b/META.json @@ -4,9 +4,9 @@ "Viacheslav Tykhanovskyi, C." ], "dynamic_config" : 0, - "generated_by" : "Minilla/v0.7.5, CPAN::Meta::Converter version 2.130880", + "generated_by" : "Minilla/v2.3.0, CPAN::Meta::Converter version 2.150005", "license" : [ - "unknown" + "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", @@ -28,15 +28,14 @@ "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" } @@ -60,11 +59,13 @@ "web" : "https://github.com/vti/routes-tiny" } }, - "version" : "0.14", + "version" : "0.15", "x_contributors" : [ "Sergey Zasenko ", "Dmitry Smal ", "Dinar Sabitov ", + "Jonathan R. Warden ", "vti " - ] + ], + "x_serialization_backend" : "JSON::PP version 2.27203" } diff --git a/README.md b/README.md index 7ee77a7..c1e0b79 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,9 @@ Routes::Tiny - Routes # DESCRIPTION -[Routes::Tiny](http://search.cpan.org/perldoc?Routes::Tiny) is a lightweight routes implementation. +[Routes::Tiny](https://metacpan.org/pod/Routes::Tiny) is a lightweight routes implementation. -[Routes::Tiny](http://search.cpan.org/perldoc?Routes::Tiny) aims to be easy to use in any web framework. +[Routes::Tiny](https://metacpan.org/pod/Routes::Tiny) aims to be easy to use in any web framework. # FEATURES @@ -56,6 +56,14 @@ Routes::Tiny - Routes It is possible to specify a constraint that a placeholder must match using a normal Perl regular expression. +Constraints can be passed as array references: + + $routes->add_route('/articles/:action', + constraints => {action => [qw/add update/]}); + + $match = $routes->match('/articles/add'); # Routes::Tiny::Match object + $match = $routes->match('/articles/delete'); # undef + ## `Optional placeholders` $routes->add_route('/admin/:service(/:action)?', defaults => {action => 'list'}); diff --git a/lib/Routes/Tiny.pm b/lib/Routes/Tiny.pm index ae28858..fb85ffb 100644 --- a/lib/Routes/Tiny.pm +++ b/lib/Routes/Tiny.pm @@ -7,7 +7,7 @@ require Carp; require Scalar::Util; use Routes::Tiny::Pattern; -our $VERSION = 0.14; +our $VERSION = 0.15; sub new { my $class = shift; @@ -310,6 +310,8 @@ Dmitry Smal (mialinx) Dinar (ziontab) +Jonathan R. Warden + =head1 AUTHOR Viacheslav Tykhanovskyi, C.