Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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

by swl (Vicar)
on Oct 17, 2021 at 08:24 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2023-02-01 23:12 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (15 votes). Check out past polls.