hi,
What I want is access from module to executed-at-the-moment script namespace
i.e.
the module Utils.pm :
$"abc.asp"::buffer .= 'hello.';
the script xxx.asp :
use Utils;
use vars qw($buffer);
print $buffer
==============
How can I do this. Currently I'm doing something like this :
the module Utils.pm :
(export $buffer)
our $buffered = 1;
our $buffer;
eval qq{ $buffer = '' };
sub _print {
if ($buffered) { $buffer .= $_ for @_ }
else { print $_ for @_ };
};
the script :
use Utils;
print $buffer
but this still doen't clear the buffer betwen different invocation of the
script..
tried also :
eval q{ $buffer = '' };
AND
eval { $buffer = '' };
how can I achieve similar effect .. or I'm doing something wrong
PS. It seems to work only if into the script I'm clearing $Utils::buffer at
the begining of the script, but this is exactly what I don't want to do...
want this to be done from outside... code reuse i say :"). It doesn't matter
too much to me where is the $buffer variable in Utils or in the script
name-space, I just don't want to clear it out manualy every time in the
script...
Thanx alot in advance
=====
iVAN
[EMAIL PROTECTED]
=====