Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks Ken,

you are right, it's possible to use my $var; in non-void context, actually I'm regularly prepending warn for debugging.°

> While these features remain experimental, they're rather unwieldy and probably easy to get wrong:

They are indeed not nice to activate, I'd probably write a module bundling those four steps to avoid boilerplate.

But the feature is very nice in many circumstances, Brian d Foy² lists some here:

it's also very handy when working with aliases, and one doesn't want to litter ones code with cryptic $_[N°]

D:\tmp\pm>perl -Mfeature=:all -M-warnings sub uc_name { my \$name = \$_[0]; $name = uc $name } $n="ken"; uc_name($n); say $n __END__ KEN

FWIW Perl4 had an aliasing feature with *type-globs, but this was restricted to package vars.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) actually I'm even putting the warn into the line before, like this I'm flexible with (un)commenting it.

# warn my $x = ...;

²) corrected spelling twice (= deux fois ;)

In reply to Re^2: POD for use feature 'declared_refs' wrong by LanX
in thread POD for use feature 'declared_refs' wrong by LanX

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2022-01-28 12:51 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.