develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #21396] documentation error in subs.pm

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
January 27, 2012 21:47
Subject:
[perl #21396] documentation error in subs.pm
Message ID:
rt-3.6.HEAD-14510-1327729632-1261.21396-15-0@perl.org
On Fri Jan 27 18:59:01 2012, jkeenan wrote:
> On Thu Mar 27 15:40:41 2003, ysth wrote:
> > On 27 Feb 2003 23:31:17 -0000, Juerd wrote:
> > >"They are thus effective for the entire file in which they appear."
> > >
> > >That should be entire *package*, not file.
> > 
> > The paragraph in question is this:
> >   Unlike pragmas that affect the C<$^H> hints variable, the C<use
> vars> and
> >   C<use subs> declarations are not BLOCK-scoped.  They are thus
effective
> >   for the entire file in which they appear.  You may not rescind such
> >   declarations with C<no vars> or C<no subs>.
> > 
> > (An almost identical paragraph is in vars.pm.)
> > 
> > Changing it to say package doesn't help, since the effect is no more
> > limited to the package C<use> appears in than to the block:
> > 
> > { package Foo; use subs 'Bar::bar'; }  print STDOUT Bar::bar;
> > 
> > Do you have an another suggestion for how to change the wording?
> > 
> 
> The discussion in this ticket petered out nearly nine years ago.  The
> documentation in 'lib/subs.pm' and 'lib/vars.pm' (blead) is virtually
> unchanged.  So the issue -- if there is one -- remains.
> 
> Suggestions?

I think we should change ‘file’ to ‘package’.  The objection concerns a
case too obscure to worry about.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=21396

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About