develooper Front page | perl.perl5.porters | Postings from March 2003

Re: [perl #21396] documentation error in subs.pm

Thread Previous | Thread Next
From:
sthoenna
Date:
March 27, 2003 15:40
Subject:
Re: [perl #21396] documentation error in subs.pm
Message ID:
Ge4g+gzkgule092yn@efn.org
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?

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