Hi,

the same is true for Dancer2. I can manually give the slice param to each
template call and it will be passed to Mason run().

Bye,


On Fri, Aug 23, 2013 at 4:41 PM, Jérôme Étévé <jerome.et...@gmail.com>wrote:

> Hi!
>
> Thanks for that! Looking forward to giving a go at your Dancer2/Mason2
> glue :)
>
> Apparently with Dancer (1), you just have to give slice => param
> 'slice' to the 'template' call to have 'slice' going to the Mason2
> 'run' method.
>
> Will give it a go. That'll be a good occasion to try Dancer :)
>
> Cheers,
>
> J.
>
>
> On 23 August 2013 16:17, Pedro Melo <m...@simplicidade.org> wrote:
> > Hi,
> >
> > on Dancer2, with the Mason plugin I'm using (and will soon release to
> CPAN)
> > all parameters appear on the mason site as a 'params' param. That's not
> what
> > Mason expects but it is consistent with the other Dancer2 template
> plugins.
> >
> > You can manually at the Dancer2 controller level move a param slice into
> a
> > proper Mason parameter though, but it is manual, per route.
> >
> > So out of the box it will not work. A workaround could be to add
> something
> > like this to Base.mp:
> >
> > method slice () { $self->params->{slice} }
> >
> > Need to re-check Poet, my memory is foggier on that one.
> >
> > Bye,
> >
> >
> > On Fri, Aug 23, 2013 at 3:19 PM, Jérôme Étévé <jerome.et...@gmail.com>
> > wrote:
> >>
> >> Hi,
> >>
> >> Thanks!
> >>
> >> I read that you use Dancer and Poet as mvc's framework. Do you mind
> >> giving a go at
> >> SliceFilter with them and see if/how the '?slice=whatever' parameter
> >> is (or is not) transfered to mason?
> >>
> >> I'll add a 'Thanks' section to the next release :)
> >>
> >> Hope it's not too much bother.
> >>
> >> Cheers!
> >>
> >> Jerome.
> >>
> >>
> >> On 23 August 2013 14:33, Pedro Melo <m...@simplicidade.org> wrote:
> >> > Nice….
> >> >
> >> >
> >> > On Fri, Aug 23, 2013 at 11:52 AM, Jérôme Étévé <
> jerome.et...@gmail.com>
> >> > wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> I have released a new Mason filter plugin:
> >> >> https://metacpan.org/module/Mason::Plugin::SliceFilter
> >> >>
> >> >> It doesn't depend on any funky stuff. Just plain Mason dependencies
> >> >> like other popular plugins.
> >> >>
> >> >> What it does is quite simple:
> >> >>
> >> >> It outputs only slices of your page content on demand, according to a
> >> >> URL
> >> >> param.
> >> >>
> >> >> I use it to dynamically populate my pages in ajax with slices of
> fresh
> >> >> content, but there's probably other uses for it.
> >> >>
> >> >> Any feedback is welcome :)
> >> >>
> >> >> Cheers,
> >> >>
> >> >> Jerome.
> >> >>
> >> >> --
> >> >> Jerome Eteve
> >> >> +44(0)7738864546
> >> >> http://www.eteve.net/
> >> >>
> >> >>
> >> >>
> >> >>
> ------------------------------------------------------------------------------
> >> >> Introducing Performance Central, a new site from SourceForge and
> >> >> AppDynamics. Performance Central is your source for news, insights,
> >> >> analysis and resources for efficient Application Performance
> >> >> Management.
> >> >> Visit us today!
> >> >>
> >> >>
> >> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> >> >> _______________________________________________
> >> >> Mason-users mailing list
> >> >> Mason-users@lists.sourceforge.net
> >> >> https://lists.sourceforge.net/lists/listinfo/mason-users
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Pedro Melo
> >> > @pedromelo
> >> > http://www.simplicidade.org/
> >> > xmpp:m...@simplicidade.org
> >> > mailto:m...@simplicidade.org
> >>
> >>
> >>
> >> --
> >> Jerome Eteve
> >> +44(0)7738864546
> >> http://www.eteve.net/
> >
> >
> >
> >
> > --
> > Pedro Melo
> > @pedromelo
> > http://www.simplicidade.org/
> > xmpp:m...@simplicidade.org
> > mailto:m...@simplicidade.org
>
>
>
> --
> Jerome Eteve
> +44(0)7738864546
> http://www.eteve.net/
>



-- 
Pedro Melo
@pedromelo
http://www.simplicidade.org/
xmpp:m...@simplicidade.org
mailto:m...@simplicidade.org
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to