Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

View::TT patches

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


dbix-class at trout

Nov 29, 2005, 7:48 PM

Post #1 of 11 (1037 views)
Permalink
View::TT patches

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/ +

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


zzbbyy at gmail

Nov 30, 2005, 2:16 PM

Post #2 of 11 (973 views)
Permalink
Re: View::TT patches [In reply to]

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
Attachments: TT.diff (1.93 KB)
  TestApp.diff (0.48 KB)
  06includepath.t (0.54 KB)
  Includepath.pm (0.35 KB)


dbix-class at trout

Nov 30, 2005, 5:57 PM

Post #3 of 11 (989 views)
Permalink
Re: View::TT patches [In reply to]

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 [at] lists
http://lists.rawmode.org/mailman/listinfo/catalyst


mdrichards at gmail

Nov 30, 2005, 10:49 PM

Post #4 of 11 (982 views)
Permalink
Re: View::TT patches [In reply to]

>
>
> > 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.


zzbbyy at gmail

Dec 1, 2005, 4:42 AM

Post #5 of 11 (962 views)
Permalink
Re: View::TT patches [In reply to]

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 <dbix-class [at] 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 [at] lists
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
Attachments: TestApp.diff (0.89 KB)
  TT.diff (3.03 KB)


dbix-class at trout

Dec 1, 2005, 9:03 AM

Post #6 of 11 (978 views)
Permalink
Re: View::TT patches [In reply to]

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 [at] lists
http://lists.rawmode.org/mailman/listinfo/catalyst


zzbbyy at gmail

Dec 1, 2005, 11:40 AM

Post #7 of 11 (985 views)
Permalink
Re: View::TT patches [In reply to]

OK -- zby

On 12/1/05, Matt S Trout <dbix-class [at] 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 [at] lists
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
Attachments: dir.diff (4.90 KB)


dbix-class at trout

Dec 1, 2005, 12:52 PM

Post #8 of 11 (973 views)
Permalink
Re: View::TT patches [In reply to]

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/ +

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


ben.norman at qmunity

Dec 1, 2005, 8:52 PM

Post #9 of 11 (964 views)
Permalink
Re: Plugin::Authentication::LDAP patches [In reply to]

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.

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


ben.norman at qmunity

Dec 1, 2005, 8:52 PM

Post #10 of 11 (973 views)
Permalink
Re: Plugin::Authentication::LDAP patches [In reply to]

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.

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


dbix-class at trout

Dec 2, 2005, 1:26 PM

Post #11 of 11 (990 views)
Permalink
Re: View::TT patches [In reply to]

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/ +

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

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.