On Wed, Feb 23, 2011 at 7:47 AM, Matthias Dietrich <p...@rainboxx.de> wrote:

> Hi,
>
> it seems that at least with Catalyst::View::Mason2 it is impossible to load
> a template 'index.m' in a folder.  When specifying 'index' as template
> (which is made due to $c->action within C::V::Mason2) it only may find
> 'index/index.m', but in no case 'index.m'.
>
> I'm not deep enough in the code, maybe Jon can help?
>

__PACKAGE__->config(index_names => []) should disable that automagic for
/index.(p?m)/.

It seems to be a bit of a bug, I think.  Mason should still recognize a
direct call to the index template; instead it blocks any such request and
coerces it to a directory.  I would expect that behavior to be broken in an
environment where Mason is serving as controller and view -- i.e., /foo/bar/
works but not /foo/bar/index.html.

It's definitely not the desired behavior under Catalyst, where $c->action is
the default template.  Perhaps that index_names setting should be part of
C::V::M2.

-- 
Stephen Clouse <stephenclo...@gmail.com>
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to