Ilia, thanks for responding, that does work, for most cases. but take
this one:
<HTML>
<BODY>
[$ var $var1 $]
blah blah blah<BR>
[*
$var1 = "hello"
$var2 = ", how are you?";
*]
<HR>
[* print $var1, $var2 *]
This works fine, even though technically, if use strict was indeed place,
it would choke on $var2 not being defined. How ever, if I use the [- -]
brackets instead of the [* *] ones, use strict is enforced throughout the
document. I am thinking that maybe this is a bug with the new [* *]
brackets. Atleast, from my point of view I think it is. It could be a
design feature that I am just not aware of. But I tend to think it is a
bug. When we start playing around with use strict and the [* *] we start
getting errors saying $___b must be definied and other wierd ones. We
havent been able to duplicate a specific situation that this occurs in
though....
--mike
At 12:47 PM 2/15/01 -0500, Ilia Lobsanov wrote:
>On Thu, Feb 15, 2001 at 10:15:17AM -0500, Mike Sidoti wrote:
> > Hi, I was wondering if it was possible to include support for use
> strict in
> > embedded perl. We have tried a number of things but nothing seems to work
> > in the same manner as it would in a typical perl script. We do not
> want to
> > have to put "use strict" in every block of embperl code on a
> page. Ideally
> > it would either be a server environment setting or made usable with the
> > [* *] tags. If we use the [* *] tags it works fine until it gets to text
> > that is outside of any []s. We get an error saying:
> >
> > $___b must be defined....
> >
> > So what we think is happening is the "use strict" is being scoped into
> what
> > ever embperl code is used to process the regular plain text/html in the
> > file. However that code wasn't built with use strict, so it fails. Has
> > anyone else run into this? Is this a bug? If you could email me back at:
> > [EMAIL PROTECTED], i would appreciate it. Thank you!
> >
> > --mike
>
>
>Try this:
> [$var $var1 $var2 $]
>
>I think that makes the whole embperl document act under the `use strict`
>pragma.
>
>
>--
>Ilia Lobsanov
>Nurey Networks Inc.
>http://www.nurey.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]