Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 17th, 2012, 07:19 AM
1DMF's Avatar
1DMF 1DMF is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2009
Posts: 320 1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Days 16 h 57 m 54 sec
Reputation Power: 227
Catalsy :Path vs :Local

I'm little conused over methods with the access modifier of ':Path'

I have a new controller and have this code (which is auto generated)
Code:
sub index :Path :Args(0) {
    my ( $self, $c ) = @_;    
    $c->response->body('Matched Members::Controller::LibraryDocs in LibraryDocs.;
}


As I undestand the action mechanism, that should only run if the url is
Quote:
http://mydomain/librarydocs


and the root.pm 'index' should run if the URL is
Quote:
http://mydomain/


Only now when the root url is accessed, the librarydocs method is running?

Why?

Edit->

infact I added a method in the librarydocs controller
Code:
sub test :Path :Args(0){    
    
    my ( $self, $c ) = @_;     
    $c->response->body('Matched HLP_Members::Controller::LibraryDocs test in LibraryDocs.); 
    
    }


which won't run if I use the url
Quote:
http://mydomain/librarydocs/test
but does run for
Quote:
http://mydomain/


__________________
Free MP3 Dance Music Downloads

To err is human; To really balls things up you need Microsoft!

Last edited by 1DMF : October 17th, 2012 at 07:29 AM.

Reply With Quote
  #2  
Old October 17th, 2012, 08:03 AM
1DMF's Avatar
1DMF 1DMF is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2009
Posts: 320 1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level)1DMF User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 3 Days 16 h 57 m 54 sec
Reputation Power: 227
In the end I deleted the LibraryDocs.pm code, copied the Site.pm controller code and recreated the LibraryDocs.pm code and now it is showing in the devel server.

Quote:
.-----------------------------------------------------------------+----------.
| Class | Type |
+-----------------------------------------------------------------+----------+
| Members::Controller::LibraryDocs | instance |
| Members::Controller::Root | instance |
| Members::Controller::Site | instance |
| Members::Model::DBLOCAL | instance |
| Members::Model::Sql | instance |
'-----------------------------------------------------------------+----------'

[debug] Loaded Private actions:
.----------------------+--------------------------------------+--------------.
| Private | Class | Method |
+----------------------+--------------------------------------+--------------+
| /default | Members::Controller::Root | default |
| /end | Members::Controller::Root | end |
| /index | Members::Controller::Root | index |
| /auto | Members::Controller::Root | auto |
| /librarydocs/index | Members::Controller::LibraryDocs | index |
| /site/index | Members::Controller::Site | index |
'----------------------+--------------------------------------+--------------'

[debug] Loaded Path actions:
.-------------------------------------+--------------------------------------.
| Path | Private |
+-------------------------------------+--------------------------------------+
| / | /index |
| /... | /default |
| /librarydocs/ | /librarydocs/index |
| /site/ | /site/index |
'-------------------------------------+--------------------------------------'


Now onto the next problem! :confused:

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Catalsy :Path vs :Local

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap