Gerald Richter wrote:
>
> Neil,
>
> first of all it would be possible. Because more people already run across
> this problem (even without EmbperlObject), I have somewhere in my mind the
> idea of an export or share parameter for Execute, something like
>
> Execute ({inputfile => '*', export =>
>
> So the scope of those variables are only within the [$ if $] block?
Every [+/-/$ $/-/+] block in Embperl behaves like a { } block in Perl. So
the answer is yes.
> I thought
> maybe the scope would be everything from the [$ if $] block to the [$ else
$]
> block. Guess not, huh? Thanks for th
Along vaguely similar lines, I would like Embperl to be able to take a $user
object stored in pnotes and make it accessible as a global in the same way
that e.g. $req_rec is accessible. Would this be possible?
Thanks,
Jonny
J>-Original Message-
J>From: Neil Gunton [mailto:[EMAIL PROTECT
Neil,
first of all it would be possible. Because more people already run across
this problem (even without EmbperlObject), I have somewhere in my mind the
idea of an export or share parameter for Execute, something like
Execute ({inputfile => '*', export => ['$foo', '@bar']}) ;
then $foo and
>
> Here's a quick observation. I was doing [- Execute ("header.html") -] it
> is much better to give it full path because the template file looks in the
> current direcoty as its root. So even [- Execute ("/header.html") -] fails
> under the /login directory because the file.html is in the / dire
Thanks Gerald. Actually the $1, $2 etc was how I originally tried it.
So the scope of those variables are only within the [$ if $] block? I thought
maybe the scope would be everything from the [$ if $] block to the [$ else $]
block. Guess not, huh? Thanks for the example code.
- Gavin
>From:
Hi Gerald,
I had an idea regarding the issue of having variables which are visible
to all pages in any request. Currently we get a Request object passed in
on the stack, which we can set variables in. However I have found this
to be rather inconvenient due to the extra syntax involved with
access
On Fri, 9 Feb 2001, Gerald Richter wrote:
> >
> > Just an idea, as a workaround:
> >
>
> Neil, you are right. We don't need two configurations blocks and it's not
> only a workaround, this is the better solution.
>
Thanks Neil and Gerald. The below solution works great. Maybe add that to
the
> Does Embperl use the variables $&, $`, $', $1, $2 etc for things other
than
> pattern matching?
Embperl doesn't use them in any way.
But they are local, so you have to use them in the same block or assign them
to a variable first.
BTW $&, $`, $' are very expensive in Perl, it's better to us
>
> Just an idea, as a workaround:
>
Neil, you are right. We don't need two configurations blocks and it's not
only a workaround, this is the better solution.
Just write
PerlSetEnv EMBPERL_OBJECT_BASE sat-template.html
PerlSetEnv EMBPERL_FILESMATCH "\.html"
SetHandler perl-script
Does Embperl use the variables $&, $`, $', $1, $2 etc for things other than
pattern matching? I'm trying to take some text and find all occurances of a
string in it and make those occurances in bold font, even if they are only part
of a word (http://www.kvic.com/f.epl):
[-
$
> > >
> > > Any other ideas ?
> > >
> >
> > Not so much. Maybe you can try to use Blocks, instead of
> > and see if this changes anything (they are handle slightly
> > different inside of Apache)
>
> Yeah, I had tried the blocks first. Sigh.
>
> ~Baiju
Just an idea, as a workaround:
If you
>
> > >
> > > Any other ideas ?
> > >
> >
> > Not so much. Maybe you can try to use Blocks, instead of
> > and see if this changes anything (they are handle slightly
> > different inside of Apache)
>
> Yeah, I had tried the blocks first. Sigh.
>
>
Strange! I try to set it up here over the week
On Fri, 9 Feb 2001, Gerald Richter wrote:
> >
> > Any other ideas ?
> >
>
> Not so much. Maybe you can try to use Blocks, instead of
> and see if this changes anything (they are handle slightly
> different inside of Apache)
Yeah, I had tried the blocks first. Sigh.
~Baiju
-
Hey,
instead of sending the same mail over and over again, what's about reading
the answers and trying it out (see my mail from 2/2/2001)
Gerald
-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserve
>
> Any other ideas ?
>
Not so much. Maybe you can try to use Blocks, instead of
and see if this changes anything (they are handle slightly
different inside of Apache)
Gerald
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On Fri, 9 Feb 2001, Gerald Richter wrote:
> >
> > I tried to following, but it did not work. Any suggestions or hints ? I
> > could not find anything under the EmbperlObject docs.
> >
>
> Normaly this should work this way. What happens if you remove the first
> Location block, so that only the
17 matches
Mail list logo