9 More Discussions You Might Find Interesting
1. What is on Your Mind?
While working on my current "UNIX history project" I ran across this:
Jerry Saltzer created an online scanned copy of the Multics Systems Programmers' Manual (MSPM) in this directory.
Based on the 1969-04-01 MSPM, the repo comprising 996 PDF files.
In order to help preserver the MSPM, ... (1 Reply)
Discussion started by: Neo
1 Replies
2. Forum Support Area for Unregistered Users & Account Problems
When I visit Programmers forum my ESET Nod32 detects TrojanDownloader.Pegel.BH.trojan
I don't know when it started, as I visited the site today after staying off-line a few days. (2 Replies)
Discussion started by: migurus
2 Replies
3. Programming
i have MOTIF installed X11
a easy program is saved as hello.c
there is the following message
where can i get the X11/intrinsic.h , file ???
need help to compile
my system : MX-16 Linux Debian Jessie / i386
hans@mx1:~/Documents
$ cc push.c -o push -lXm -lXt -lX11
In file included from... (0 Replies)
Discussion started by: Zabo
0 Replies
4. Shell Programming and Scripting
hi,
i am new to shell scripts
i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies
5. Shell Programming and Scripting
I've seen so many times that programmers were confused about shell quoting and white spaces interpretation, that I decided to investigate that problem deeper. And my conclusion is that quoting in shells is very different from other programming languages. Programmers who have bigger experience in... (6 Replies)
Discussion started by: wyderkat
6 Replies
6. Solaris
Hi All,
How to restrict the NIS users not to change their passwords in for NIS users??
and my NIS user is unable to login to at client location what could be the problem for this ?
Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies
7. What is on Your Mind?
Can someone suggest any online venues to assist in recruiting a senior C programmer (looking for someone interested in working on kerberos code).
I've tried a bunch of the open source and higher ed lists (this is for Univ. of Michigan). The commercial services such as Dice or monster yield a... (7 Replies)
Discussion started by: painman
7 Replies
8. News, Links, Events and Announcements
Check the essays out.
http://www.paulgraham.com (0 Replies)
Discussion started by: photon
0 Replies
9. UNIX for Advanced & Expert Users
I have never programmed in Perl (insert laughter, mock, etc. here ____) - so I need a sort of "Programming in Perl" covering the basics.
I now have two Perl books, one is a 5 volume Unix resource kit, the other is "Mastering algorithms with Perl" - none of them explains how to produce "hello,... (11 Replies)
Discussion started by: AtleRamsli
11 Replies
Mojolicious::Routes(3pm) User Contributed Perl Documentation Mojolicious::Routes(3pm)
NAME
Mojolicious::Routes - Always find your destination with routes
SYNOPSIS
use Mojolicious::Routes;
# New routes tree
my $r = Mojolicious::Routes->new;
# Normal route matching "/articles" with parameters "controller" and
# "action"
$r->route('/articles')->to(controller => 'article', action => 'list');
# Route with a placeholder matching everything but "/" and "."
$r->route('/:controller')->to(action => 'list');
# Route with a placeholder and regex constraint
$r->route('/articles/:id', id => qr/d+/)
->to(controller => 'article', action => 'view');
# Route with an optional parameter "year"
$r->route('/archive/:year')
->to(controller => 'archive', action => 'list', year => undef);
# Nested route for two actions sharing the same "controller" parameter
my $books = $r->route('/books/:id')->to(controller => 'book');
$books->route('/edit')->to(action => 'edit');
$books->route('/delete')->to(action => 'delete');
# Bridges can be used to chain multiple routes
$r->bridge->to(controller => 'foo', action =>'auth')
->route('/blog')->to(action => 'list');
# Simplified Mojolicious::Lite style route generation is also possible
$r->get('/')->to(controller => 'blog', action => 'welcome');
my $blog = $r->under('/blog');
$blog->post('/list')->to('blog#list');
$blog->get(sub { shift->render(text => 'Go away!') });
DESCRIPTION
Mojolicious::Routes is the core of the Mojolicious web framework.
See Mojolicious::Guides::Routing for more.
ATTRIBUTES
Mojolicious::Routes inherits all attributes from Mojolicious::Routes::Route and implements the following new ones.
"base_classes"
my $classes = $r->base_classes;
$r = $r->base_classes(['MyApp::Controller']);
Base classes used to identify controllers, defaults to Mojolicious::Controller and Mojo.
"cache"
my $cache = $r->cache;
$r = $r->cache(Mojo::Cache->new);
Routing cache, defaults to a Mojo::Cache object.
# Disable caching
$r->cache(0);
"conditions"
my $conditions = $r->conditions;
$r = $r->conditions({foo => sub {...}});
Contains all available conditions.
"hidden"
my $hidden = $r->hidden;
$r = $r->hidden([qw(attr has new)]);
Controller methods and attributes that are hidden from routes, defaults to "attr", "has" and "new".
"namespace"
my $namespace = $r->namespace;
$r = $r->namespace('Foo::Bar::Controller');
Namespace used by "dispatch" to search for controllers.
"shortcuts"
my $shortcuts = $r->shortcuts;
$r = $r->shortcuts({foo => sub {...}});
Contains all available shortcuts.
METHODS
Mojolicious::Routes inherits all methods from Mojolicious::Routes::Route and implements the following ones.
"add_condition"
$r = $r->add_condition(foo => sub {...});
Add a new condition.
"add_shortcut"
$r = $r->add_shortcut(foo => sub {...});
Add a new shortcut.
"auto_render"
$r->auto_render(Mojolicious::Controller->new);
Automatic rendering.
"dispatch"
my $success = $r->dispatch(Mojolicious::Controller->new);
Match routes with Mojolicious::Routes::Match and dispatch.
"hide"
$r = $r->hide(qw(foo bar));
Hide controller methods and attributes from routes.
"route"
my $route = $r->route;
my $route = $r->route('/:action');
my $route = $r->route('/:action', action => qr/w+/);
my $route = $r->route(format => 0);
Generate route matching all HTTP request methods.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojolicious::Routes(3pm)