You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Rafiq Ismail (ADMIN)" <ra...@joshua.dreamthought.com> on 2002/04/08 16:22:46 UTC
tt2 using mason tags
Hi,
I'm experimenting with conversion of a mason template based system to tt2.
I tried to set TT2Tags to mason and then to <% > however this, even with
the evaluate option to on, doesn't seem to work. (Apache::Template)
I then wrote a custom handler which uses a custom parser, which I've
constructed with the tag style set to mason. No go there either. I've got
inline perl turned on, however I seem to alternate between a random
permissions error (probably a silly oversight) and an unevaluated
tempalate.
Does this sound familiar?
Has anyone had any success with porting straight from Mason?
Part two would be to replace the inline code with tt2 directives- thought
it was worth mentioning this before getting flamed. :)
I'm just after evaluation with mason tags. Anyone?
TIA,
fiq
__
"__ __ _ __ __
| \/ | ___ __| | ___ _ __ _ __ | \/ | __ _ _ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \| |\/| |/ _` | '_ \
| | | | (_) | (_| | __/ | | | | | | | | (_| | | | |
|_| |_|\___/ \__,_|\___|_| |_| |_|_| |_|\__,_|_| |_|
a pathetic example of his organic heritage"
- Bad Religion
Re: Mem usage of modules
Posted by Sammy Lau <sa...@team.outblaze.com>.
Using mod_rewrite instead of symlink should solve your problem.
> > The auk_ch_de and auk_ch_fr scripts are preloaded with RegistryLoader.
> > But these scripts are also mentioned later on that list - is that
> > means they were loaded into memoey twice
>
> yes
>
> http://perl.apache.org/guide/performance.html#Be_Careful_with_Symbolic_Links
>
> > (in fact all the auk_ scripts are sym
> > links to the same script auk) ?
> >
> > Thanks
> > Pawel
--
Sammy Lau
mailto: sammy@team.outblaze.com
- Tell me what you want and I'll tell you how you can live without it.
Re: Mem usage of modules
Posted by Stas Bekman <st...@stason.org>.
pawelp wrote:
> Hi
>
> Under Mem Usage menu I have list like this:
>
> Apache::ROOT::cgi_2dbin::auk_ch_de
> Apache::ROOT::cgi_2dbin::auk_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_aw_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_aw_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ca_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cn_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cq_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cq_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sc_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sg_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sg_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_xa_ch_de
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_xa_ch_fr
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::msn_2epl
> Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::sunrise
>
> The auk_ch_de and auk_ch_fr scripts are preloaded with RegistryLoader.
> But these scripts are also mentioned later on that list - is that
> means they were loaded into memoey twice
yes
http://perl.apache.org/guide/performance.html#Be_Careful_with_Symbolic_Links
> (in fact all the auk_ scripts are sym
> links to the same script auk) ?
>
> Thanks
> Pawel
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Mem usage of modules
Posted by pawelp <pa...@man.poznan.pl>.
Hi
Under Mem Usage menu I have list like this:
Apache::ROOT::cgi_2dbin::auk_ch_de
Apache::ROOT::cgi_2dbin::auk_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_aw_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_aw_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ca_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cn_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cq_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_cq_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sc_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sg_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_sg_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_xa_ch_de
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::auk_xa_ch_fr
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::msn_2epl
Apache::ROOTdynamic_2ericardo_2ech::cgi_2dbin::sunrise
The auk_ch_de and auk_ch_fr scripts are preloaded with RegistryLoader.
But these scripts are also mentioned later on that list - is that
means they were loaded into memoey twice (in fact all the auk_ scripts are sym
links to the same script auk) ?
Thanks
Pawel
Re: tt2 using mason tags
Posted by Perrin Harkins <pe...@elem.com>.
Rafiq Ismail (ADMIN) wrote:
> It's just the fact that in spite of my specifying that it should use
> inline_perl, it didn't interpolate the inline code which uses custom
> modules in mason tags. I've got it to try and interpolate now, however it
> seems to warn that "$VARNAME's" are odd symbols.
If you post an example of the troublesome templates on the TT list,
someone will probably be able to help you.
- Perrin
Re: tt2 using mason tags
Posted by "Rafiq Ismail (ADMIN)" <ra...@joshua.dreamthought.com>.
> Mark Fowler wrote:
> Agreed. Also, any significant Mason component is likely to use Mason's
> built-in object model, which is not part of TT. You will probably have
> to port some code before it will run.
Understood, but it's a small application which is more custom o.o. perl
and inline perl based than it is custom mason. Other than the fact that
it gets rendered by mason, it is pretty independent.
It's just the fact that in spite of my specifying that it should use
inline_perl, it didn't interpolate the inline code which uses custom
modules in mason tags. I've got it to try and interpolate now, however it
seems to warn that "$VARNAME's" are odd symbols. I'll look at that later.
Going to redo the whole thing in tt2 directives anyway.
Cheers to all.
fiq
__
"__ __ _ __ __
| \/ | ___ __| | ___ _ __ _ __ | \/ | __ _ _ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \| |\/| |/ _` | '_ \
| | | | (_) | (_| | __/ | | | | | | | | (_| | | | |
|_| |_|\___/ \__,_|\___|_| |_| |_|_| |_|\__,_|_| |_|
a pathetic example of his organic heritage"
- Bad Religion
Re: tt2 using mason tags
Posted by Perrin Harkins <pe...@elem.com>.
Mark Fowler wrote:
> Sounds like you're getting confused between [% %] for template code
> and [% PERL %] ... [% END %] for actual real perl code
Agreed. Also, any significant Mason component is likely to use Mason's
built-in object model, which is not part of TT. You will probably have
to port some code before it will run.
- Perrin
Re: How to show mem usage of all modules?
Posted by Joao Pedro Goncalves <jo...@co.sapo.pt>.
Check Apache::Status, it gives you several info.
On Tue, 2002-04-09 at 15:53, pawelp wrote:
> Hi
> Is there an easy way to show mem usage of all loaded modules ?
>
> Thanks
> Pawel Piecuch
>
--
João Pedro Gonçalves
'I have never let my schooling interfere with my education.'
- Mark Twain
How to show mem usage of all modules?
Posted by pawelp <pa...@man.poznan.pl>.
Hi
Is there an easy way to show mem usage of all loaded modules ?
Thanks
Pawel Piecuch
Re: tt2 using mason tags
Posted by Mark Fowler <ma...@twoshortplanks.com>.
On Mon, 8 Apr 2002, Rafiq Ismail (ADMIN) wrote:
> Converting Mason to TT2 stuff
Hi.
May I suggest you repost this to the template toolkit list?
http://www.template-toolkit.org/mailman/listinfo/templates
Sounds like you're getting confused between [% %] for template code
and [% PERL %] ... [% END %] for actual real perl code
Later.
Mark.
--
s'' Mark Fowler London.pm Bath.pm
http://www.twoshortplanks.com/ mark@twoshortplanks.com
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/ +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}