Discussion:
[cgi-prototype-users] CGI::Prototype::PathInfo resource tokenizing
Terrence Brannon
2005-09-09 12:21:14 UTC
Permalink
A. Pagaltzis
2005-09-09 15:31:35 UTC
Permalink
Thing is, can't a path have more than just 2 components? There
is no reason it can't have much more is there?
Sure. You can include `'thread/post'` in your valid pages and
invoke `forum.cgi/thread/post/283188/43`, in which case the
object Forum::thread::post will be loaded with `resource_id`
being `'283188/43'`. What’s your question?

Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
Terrence Brannon
2005-09-09 19:00:19 UTC
Permalink
Post by A. Pagaltzis
Thing is, can't a path have more than just 2 components? There
is no reason it can't have much more is there?
Sure. You can include `'thread/post'` in your valid pages and
invoke `forum.cgi/thread/post/283188/43`, in which case the
object Forum::thread::post will be loaded with `resource_id`
being `'283188/43'`.
I think the resource id should be a reference to an anonymous array
[ 283188, 43 ]
A. Pagaltzis
2005-09-09 20:24:41 UTC
Permalink
Post by Terrence Brannon
I think the resource id should be a reference to an anonymous
array
[ 283188, 43 ]
Then split the string into an array and save it in a slot in
`app_enter`?

It might be a good thing if this were the default behaviour, but
I have no basis on which to make that call, so I didn’t.

Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
Loading...