[Melbourne-pm] $0 manipulation

Mathew Robertson mathew.blair.robertson at gmail.com
Thu Aug 30 23:23:50 PDT 2012


> So how do I update $0 to show script status, but also to have pod2usage,
>> FindBin, etc do the right thing?
>> I dont expect an easy answer to this... other than:
>> a) wont fix
>> b) use some variation of another variable ** to fix either the CPAN
>> modules,
>> or script status.
>>
>>
>> ** I vote $^0... I dont think it is being used, and it follows both the
>> $0 =
>> name and $^ = internal-var convention.
>>
> >
> > Thoughts?
>
> There is a Sys::ProcTitle module on cpan that avoids $0, might suit
>

Hi Brad,

I am familiar with that module, see also Sys::Prtcl, which implements the
same function call (except that is does it via syscall.ph).   ACAIK, this
only sets the 16byte system proc entry.

Also worth mentioning, that the perldoc for 'perlvar $0' says that as of
V5.14, prctl() is already being called.

regards,
Mathew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20120831/ff2a24e4/attachment.html>


More information about the Melbourne-pm mailing list