Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more changes

  • Loading branch information...
commit 0cdf21914c2f24646f51c7b6159541540e5321cf 1 parent 1219f89
@Porta authored
Showing with 15 additions and 8 deletions.
  1. +11 −0 MANIFEST
  2. +2 −6 README
  3. +2 −2 lib/CGI/Application/Plugin/Routes.pm
View
11 MANIFEST
@@ -0,0 +1,11 @@
+#
+Makefile.PL
+README
+lib/CGI/Application/Plugin/Routes.pm
+t/00-load.t
+t/basic.t
+t/boilerplate.t
+t/pod-coverage.t
+t/pod.t
+t/TestApp.pm
+#
View
8 README
@@ -41,16 +41,13 @@ In TestApp.om
sub setup {
my $self = shift;
- $self->routes_root('/someroot'); #optional, will be prepended to any route.
+ $self->routes_root('/thismod');#optional, will be used to prepend every route defines in $self->routes.
$self->routes([
'' => 'home' ,
'/view/:name/:id/:email' => 'view',
]);
$self->start_mode('show');
- $self->run_modes([qw/
- view
- /]);
$self->tmpl_path('templates/');
}
sub view {
@@ -64,14 +61,13 @@ In TestApp.om
}
1;
-
ACKNOWLEDGEMENTS
Michael Peter's CGI::Application::Dispatch module that can be found here:
http://search.cpan.org/~wonko/CGI-Application-Dispatch
I borrowed from him most of the routine that parses the url.
-Mark Stosberg L<http://search.cpan.org/~markstos/> provided great feedback and fixed parts of the code making it more clean and efficient.
+Mark Stosberg http://search.cpan.org/~markstos/ provided great feedback and fixed parts of the code making it more clean and efficient.
SUPPORT AND DOCUMENTATION
View
4 lib/CGI/Application/Plugin/Routes.pm
@@ -4,7 +4,7 @@ use Carp;
use vars qw($VERSION @ISA @EXPORT);
-our $VERSION = '0.01';
+our $VERSION = '0.02';
sub import {
my $pkg = shift;
@@ -122,7 +122,7 @@ Version 0.01
=head1 SYNOPSIS
-CGI::Application::Plugin::Routes tries to bring to perl some of the goodies of Rails routes by allowing the creationg of a routes table that is parsed at the prerun stage again the CGI's path_info data.
+CGI::Application::Plugin::Routes tries to bring to perl some of the goodies of Rails routes by allowing the creation of a routes table that is parsed at the prerun stage against the CGI's path_info data.
The result of the process (if there's any match at the end of the process) is added to CGI's query method from CGI::Application and available to all the runmodes via the CGI::Application::query::param method.
By doing this, the plugin provides a uniform way to access GET and POST parameters when using clean url's with the query->param() method.
Please sign in to comment.
Something went wrong with that request. Please try again.