Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters
[perl #112126] Hash::Util export bug
 

Index | Next | Previous | View Flat


perlbug-followup at perl

Apr 21, 2012, 6:07 AM


Views: 195
Permalink
[perl #112126] Hash::Util export bug

On Thu Mar 29 20:25:21 2012, rich.a.haberman [at] gmail wrote:
>
> -----------------------------------------------------------------
>
> The docs for Hash::Util state to use "hash_unlocked" to test that a
> %hash is
> locked.
>
> hash_unlocked
>
> hash_unlocked(%hash) and print "Hash is unlocked!\n";
>
> Returns true if the hash and its keys are unlocked.
>
>
> But the docs for Hash::Util show that only "hash_locked" can be
> imported
>
> use Hash::Util qw(
> hash_seed all_keys
> lock_keys unlock_keys
> lock_value unlock_value
> lock_hash unlock_hash
> lock_keys_plus hash_locked
> hidden_keys legal_keys
> );
>
> and the Synopsis states:
>
> # Ways to inspect the properties of a restricted hash
> my @legal = legal_keys(%hash);
> my @hidden = hidden_keys(%hash);
> my $ref = all_keys(%hash,@keys,@hidden);
> my $is_locked = hash_locked(%hash);
>
>
> In Hash::Util.pm there is no "hash_locked", there is only:
>
> sub hash_unlocked(\%) { hashref_unlocked(@_) }
>
>
> and the @EXPORT_OK in Hash::Util.pm is:
>
> our @EXPORT_OK = qw(
> fieldhash fieldhashes
>
> all_keys
> lock_keys unlock_keys
> lock_value unlock_value
> lock_hash unlock_hash
> lock_keys_plus hash_locked
> hidden_keys legal_keys
>
> lock_ref_keys unlock_ref_keys
> lock_ref_value unlock_ref_value
> lock_hashref unlock_hashref
> lock_ref_keys_plus hashref_locked
> hidden_ref_keys legal_ref_keys
>
> hash_seed hv_store
>
> );
>
> so there is no way to import "hash_unlocked"
>
>
> Fix: change "hash_locked" to "hash_unlocked" in @EXPORT_OK of
> Hash::Util.pm,
> correct pod references to nonexistent "hash_locked"
>
>

This appears to be a valid complaint; the line of approach to fixing it
also appears to be correct.

cc-ing module's authors listed in documentation for comment.

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

Subject User Time
[perl #112126] Hash::Util export bug perlbug-followup at perl Apr 21, 2012, 6:07 AM
    Re: [perl #112126] Hash::Util export bug demerphq at gmail Apr 22, 2012, 3:54 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 22, 2012, 6:54 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 24, 2012, 6:03 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 25, 2012, 6:13 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 25, 2012, 8:33 PM
    Re: [perl #112126] Hash::Util export bug demerphq at gmail Apr 26, 2012, 12:55 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 26, 2012, 9:49 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 28, 2012, 5:41 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 28, 2012, 5:59 PM
    Re: [perl #112126] Hash::Util export bug doy at tozt Apr 28, 2012, 7:54 PM
        Re: [perl #112126] Hash::Util export bug nick at ccl4 May 8, 2012, 4:27 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 28, 2012, 7:59 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 28, 2012, 9:15 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 28, 2012, 9:17 PM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 29, 2012, 5:00 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 29, 2012, 5:21 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 29, 2012, 10:52 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 29, 2012, 10:53 AM
    [perl #112126] Hash::Util export bug perlbug-followup at perl Apr 29, 2012, 6:30 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.