As a general principle this is why I never put any real logic in the taglib
functions themselves. Make a seperate underlying class/module with an API
that just accepts standard perl data structures and have that do all the real
work, then your taglib itself is a thin wrapper. That way if anyone wants to
get at the underlying functionality they can just call the 'real' functions.
In any case I often find that functions in my taglib want to call each other
anyhow.
Actually with SimpleTagLib it is especially easy since it generaly is best to
have the generator functions just put in refs to action routines anyway
(wasn't the example use of SimpleTagLib set up that way?). In any case its a
more robust factoring in general.
On Monday 06 October 2003 03:04 am, J�rg Walter wrote:
> On Monday, 06. October 2003 04:00, Matthew Smith wrote:
> > How do you use one simpletaglib from another?
> >
> > E.g. from my tag handler, I want to set a session variable - so how do I
> > call <session:set-attribute name="cmd">doit</session:set-attribute>
> > from a taglib?
> >
> > To call webutils I just go
> > AxKit::XSP::WebUtils->redirect($blah);
> > That doesn't work for AxKit::XSP::Session
>
> There's no easy way apart from what Matt said. The session taglib was
> written with the old (current) version of SimpleTaglib, which places the
> code into the page and thus doesn't have user callable subs for it's
> functions. It is a good idea, however, and I will bear it in mind when
> finishing up the next release.
>
> In your case, you may use $r->pnotes('SESSION')->{cmd} = "doit"; for now.
> That's how it is documented in the plugin man page.
--
Tod Harter
Giant Electronic Brain
http://www.giantelectronicbrain.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]