FAQ
Can we move it to this thread please, and can the (more than one) person
who's been working on this try and get together and produce a single patch
with tests? I'd love to see this feature make it into trunk but I don't have
the time to trawl through and figure out who's implemented what :)

--
Matt S Trout Specialists in Perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information

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

Search Discussions

  • Zbigniew Lukasiak at Nov 30, 2005 at 11:10 pm
    Hi,

    Sometimes you need to set additional search paths dynamically (from
    the controllers). With this patch you can just put the paths on stash
    and they will be added to the list used by the View, after processing
    the search paths list is restored back, so that subsequent requests
    will not change the search path for each other.

    I needed that to set the search path to a library of templates I want
    to bundle together with a controller.

    You can use it like that:

    $c->stash->{additional_include_paths} = [$c->config->{root} .
    '/test_include_path'];

    In attachments you'll find:
    TT.diff - the patch to Catalyst::View::TT, against trunk
    TestApp.diff - patch to the test application (goes into t/lib/TestApp.pm)
    06includepath.t - new tests (t/06includepath.t)
    Includepath.pm - new view subclass for the tests
    (t/lib/TestApp/View/TT/Includepath.pm)

    You'll need to create needed directory and copy
    t/lib/TestApp/root/test.tt to
    t/lib/TestApp/root/test_include_path/testpath.tt to run the tests.

    I hope I did not forget about anything.

    -- Zbyszek
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: TT.diff
    Type: text/x-patch
    Size: 1976 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051130/64435c72/TT.bin
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: TestApp.diff
    Type: text/x-patch
    Size: 493 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051130/64435c72/TestApp.bin
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: 06includepath.t
    Type: application/x-troff
    Size: 555 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051130/64435c72/06includepath.t
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: Includepath.pm
    Type: application/x-perl
    Size: 358 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051130/64435c72/Includepath.bin
  • Matt S Trout at Dec 1, 2005 at 2:42 am

    On Wed, Nov 30, 2005 at 11:16:11PM +0100, Zbigniew Lukasiak wrote:
    Hi,

    Sometimes you need to set additional search paths dynamically (from
    the controllers). With this patch you can just put the paths on stash
    and they will be added to the list used by the View, after processing
    the search paths list is restored back, so that subsequent requests
    will not change the search path for each other.

    I needed that to set the search path to a library of templates I want
    to bundle together with a controller.
    Diff looks pretty good, could I have it as a diff -u or svn diff or similar
    please?
    You can use it like that:

    $c->stash->{additional_include_paths} = [$c->config->{root} .
    '/test_include_path'];
    Do people think there's enough chance of a namespace collision to include
    an option to turn this off? I'm voting for "no" myself :)

    --
    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/ +
  • Michael Richards at Dec 1, 2005 at 7:43 am

    You can use it like that:

    $c->stash->{additional_include_paths} = [$c->config->{root} .
    '/test_include_path'];
    Do people think there's enough chance of a namespace collision to include
    an option to turn this off? I'm voting for "no" myself :)
    Maybe if it were just a bit more specific to its purpose,
    "template_include_paths" or something.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051130/96e1429b/attachment.htm
  • Zbigniew Lukasiak at Dec 1, 2005 at 1:36 pm
    OK. Here it is. diff -u and tt_additional_include_paths as the
    parameter. I hope such a long name will save us from name clash.

    -- Zbyszek
    On 12/1/05, Matt S Trout wrote:
    On Wed, Nov 30, 2005 at 11:16:11PM +0100, Zbigniew Lukasiak wrote:
    Hi,

    Sometimes you need to set additional search paths dynamically (from
    the controllers). With this patch you can just put the paths on stash
    and they will be added to the list used by the View, after processing
    the search paths list is restored back, so that subsequent requests
    will not change the search path for each other.

    I needed that to set the search path to a library of templates I want
    to bundle together with a controller.
    Diff looks pretty good, could I have it as a diff -u or svn diff or similar
    please?
    You can use it like that:

    $c->stash->{additional_include_paths} = [$c->config->{root} .
    '/test_include_path'];
    Do people think there's enough chance of a namespace collision to include
    an option to turn this off? I'm voting for "no" myself :)

    --
    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@lists.rawmode.org
    http://lists.rawmode.org/mailman/listinfo/catalyst
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: TestApp.diff
    Type: text/x-patch
    Size: 913 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051201/36763c61/TestApp.bin
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: TT.diff
    Type: text/x-patch
    Size: 3102 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051201/36763c61/TT.bin
  • Matt S Trout at Dec 1, 2005 at 5:48 pm

    On Thu, Dec 01, 2005 at 01:42:38PM +0100, Zbigniew Lukasiak wrote:
    OK. Here it is. diff -u and tt_additional_include_paths as the
    parameter. I hope such a long name will save us from name clash.
    Ok, that's a diff -u between specific files so it's lost the added stuff
    - you want to be doing it against the two directory trees to get all changes
    aggregated into a single patch.

    Also, how does 'additional_template_paths' sound? I don't want to have tt
    in the name because I'd like this to be able to become another "common
    Catalyst View convention" if the maintainers of the other view modules
    decide they like it.

    --
    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/ +
  • Zbigniew Lukasiak at Dec 1, 2005 at 8:35 pm
    OK -- zby
    On 12/1/05, Matt S Trout wrote:
    On Thu, Dec 01, 2005 at 01:42:38PM +0100, Zbigniew Lukasiak wrote:
    OK. Here it is. diff -u and tt_additional_include_paths as the
    parameter. I hope such a long name will save us from name clash.
    Ok, that's a diff -u between specific files so it's lost the added stuff
    - you want to be doing it against the two directory trees to get all changes
    aggregated into a single patch.

    Also, how does 'additional_template_paths' sound? I don't want to have tt
    in the name because I'd like this to be able to become another "common
    Catalyst View convention" if the maintainers of the other view modules
    decide they like it.

    --
    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@lists.rawmode.org
    http://lists.rawmode.org/mailman/listinfo/catalyst
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: dir.diff
    Type: text/x-patch
    Size: 5021 bytes
    Desc: not available
    Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051201/9de62679/dir-0001.bin
  • Matt S Trout at Dec 1, 2005 at 9:36 pm

    On Thu, Dec 01, 2005 at 08:40:26PM +0100, Zbigniew Lukasiak wrote:
    OK -- zby
    Still didn't include the test script contents that I can see.

    --
    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/ +
  • Matt S Trout at Dec 2, 2005 at 10:10 pm

    On Thu, Dec 01, 2005 at 08:52:02PM +0000, Matt S Trout wrote:
    On Thu, Dec 01, 2005 at 08:40:26PM +0100, Zbigniew Lukasiak wrote:
    OK -- zby
    Replying to myself because zby sent the good patch off list - committed,
    many thanks!

    --
    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/ +
  • Ben Norman at Dec 2, 2005 at 5:45 am
    I have users more than one top level ou in AD.
    The following diff would allow me to look for a user across the entire
    directory.

    97,98c97
    < my $user_context = $c->config->{authentication}->{user_context} || '';
    < $user_context .= ',' if $user_context;
    ---
    my $user_context = $c->config->{authentication}->{user_context} ||
    'cn=users';
    114c113
    < base => $user_context . $dnc,
    ---
    base => $user_context . "," . $dnc,
    Can this patch be applied to Catalyst::Plugin::Authentication::LDAP please?

    thanks
    ben

    ----------------------------------------------------------------
    This message was sent using IMP, the Internet Messaging Program.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedNov 30, '05 at 4:33a
activeDec 2, '05 at 10:10p
posts10
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase