On Tue, Dec 02, 2003 at 03:16:33PM +0100, Benni Baermann wrote:
> I noticed, that $0 is set to "-e" in my module if it is called from
> embperl. Is this the normal behaviour or just random?
>
> Is there another - possible better - way to determine in my modul, if
> the function is called from Embperl or from an ordinary script?
>
Try this inside your function:
# tested on HTML-Embperl-1.3.4
if ( (caller)[0] =~ /^HTML::Embperl::DOC::_\d+$/ ) {
# was called from Embperl
} else {
# was called from elsewhere
}
HTH
Sherwin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]