[Pdx-pm] Changing contructors w/o breaking compat.

Randal L. Schwartz merlyn at stonehenge.com
Sat Oct 26 13:48:15 CDT 2002

>>>>> "Austin" == Austin Schutz <tex at off.org> writes:

>> I was hoping to find a way to allow Net::Ping support both the old systax and the "newer 'more' conventional" one so I could send a patch to the author.

Austin> 	Err.. Randal's solution supports both forms of the syntax.

Right.  If it's a hashref, then use hash-ish (:-) keyword
interpretation.  If it's not, then use the older invocation.

Austin> 	Btw, never seen the %{+shift} syntax before. Is that a
Austin> new thing, a sneaky trick, or have I been living under a rock?

Well, %{shift} is the same as %shift - a hash named shift.  But adding
+ in front changes the syntax interpretation without changing any

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

More information about the Pdx-pm-list mailing list