[Catalyst] issue with Path method not catching '.html' portion

Edric ehankamo at yahoo.com
Mon Mar 20 06:56:56 CET 2006


i speicfy 'test.html' in the parameter for Path. i expect it to match  the url ending with 'test.html'... i read the documentation over and  over and it's supposed to match a literal... hopefully a string that  will take a period?

  why does it not work correctly when i specify my document root in my  apache virtual host config file, but it works fine when specifiying  document root in  my main app class, like what is shown here  below? i'm not surre if it's my function that is the problem.
  
  __PACKAGE__->config( 
           root => '/usr/local/www/media'
   );
  
  and now i think this proves that 
  
Matt S Trout <dbix-class at trout.me.uk> wrote:  Edric wrote:
> i have this method as shown here:
> 
> sub index : Path('test.html') {
> }
> 
> i have found that when go to my browser and enter:
> "http://test.internal/test.html"
> i get the following error message:
> 
> |Couldn't render template "file error - test.html: not found"|

Then Template Toolkit can't find test.html in root/ - maybe you want to set 
$c->stash->{template} inside your action sub?

> but...
> 
> "http://test.internal/test"
> it works completely fine!

Because that doesn't match and action so will fall through to the nearest default.

Path is behaving ezactly as expected; I'm not entirely sure what you're trying 
to achieve but I don't think what you're asking Catalyst to do is the same 
thing :)

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
Catalyst mailing list
Catalyst at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst


		
---------------------------------
 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060319/f9544e31/attachment.htm 


More information about the Catalyst mailing list