Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: POD for use feature 'declared_refs' wrong

by swl (Parson)
on Oct 17, 2021 at 08:24 UTC ( [id://11137649]=note: print w/replies, xml ) Need Help??


in reply to Re: POD for use feature 'declared_refs' wrong
in thread POD for use feature 'declared_refs' wrong

WRT your last point, these features are useful when one wants to avoid repeated dereferences of list items inside loops. Doing so can give a small speed gain but my experience is that they need to avoid a pretty high number of derefs to make a meaningful difference. The same applies to Data::Alias for earlier perl versions.

A highly contrived (and incomplete) example is below. The main point is that it avoids dereferencing calls such as $path->[$i].

\my @path = $some_array_ref; my $accumulator; for my $i (0..@$path) { $accumulator += $path[$i]; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found