[Catalyst] Re: questions on Reaction

Daniel McBrearty danielmcbrearty at gmail.com
Tue Jan 2 20:10:00 GMT 2007


OK. It is a good idea to make sure everything in the view goes through
the I18N code, for sure. I'd like to merge what we are doing there
with the cat plugin, but tat can wait ...

next questions, about the Root.pm of the example app ... :

1.

use base 'Reaction::UI::RootController';
use Reaction::Class;
use aliased 'Reaction::UI::ViewPort';

do these HAVE to be in Root.pm?

I just want to use this stuff in my admin code at the moment ... say
it all sits in under MyApp::Controller::Admin ... can I just put these
there?

2.

__PACKAGE__->config(
  view_name => 'XHTML',
  window_title => 'Reaction Test App',
  namespace => '',
);

sub base :Chained('/') :PathPart('') :CaptureArgs(0) {
  my ($self, $c) = @_;
  $self->push_viewport(ViewPort, layout => 'xhtml');
}

I'm just not getting this bit. WHy do I want your XHTML view (it
happens that I use xhtml anyway ... ) but what's it all about?

3. the root action is using a viewport, pushing the template name onto
it ... what does a viewport actually do over, say, a standard TT
template?

thanks. I'll prod about with it anyway and see what happens ...


On 1/2/07, Matt S Trout <dbix-class at trout.me.uk> wrote:
>
> On 2 Jan 2007, at 18:52, Daniel McBrearty wrote:
>
> > "The only thing to remember is that it expects the I18N plugin to be
> > loaded since all text is run through that before display"
> >
> > Hmmm. I specifically don't want to use that plugin, as we have our own
> > version which is similar but different. We may be a bit wrongheaded
> > about this at the moment, but I've not yet found any practical reason
> > to change it ...
> >
> > I don't need any transation of text for the crud stuff anyhow - it's
> > all purely admin functions, which are English only.
> >
> > But I guess all it really wants is to see methods with the appropriate
> > names in the $c namespace ... so no problem.
>
> Yep, absolutely. But it was kinda critical to our use to enable L10N
> from the ground up so we used the standard approach.
>
> I explicitly -don't- check to see if the plugin's loaded though and
> never will - I might need to implement something completely different
> myself one day too :)
>
> --
> Matt S Trout, Technical Director, Shadowcat Systems Ltd.
> Offering custom development, consultancy and support contracts for
> Catalyst,
> DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
> details.
> + Help us build a better perl ORM: http://dbix-
> class.shadowcatsystems.co.uk/ +
>
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>


-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list