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

Re: patch for perl5db -> You can t FIRSTKEY with the %~ hash

Thread Previous | Thread Next
kevin dawson
January 26, 2012 13:04
Re: patch for perl5db -> You can t FIRSTKEY with the %~ hash
Message ID:
On 24/01/12 19:48, Ricardo Signes wrote:
> * kevin dawson<>  [2012-01-24T10:15:11]
>> when using perl -d
>> with action X (V) cause the following error.
>> You can't FIRSTKEY with the %~ hash at
> Hi, Kevin.  Thanks for your report.
> The problem here is that somewhere along the way, you have loaded
> File::HomeDir, which is not a core part of Perl.  The "X" command uses
> to dump all the globals, including %~, which File::HomeDir has tied.
> That tied variable does not provide the full tied hash interface.  Most
> importantly, it can't properly work with "keys" or "each"
> I'm not sure that sort of fix you provided is how we'd ought to fix this.
> It will still let one undumpable variable terminate the "X" output prematurely.
> I think instead we'd want a flag to pass to that will say "dump
> each slot carefully, providing a special marker for failed slots."
> Something like:
>    %Foo = (
>      bar =>  do { die "value could not be dumped" },
>    )
> Anybody else want to chime in, here?

I have talked to AdamK and he has updated File::HomeDir upgraded to 0.99

Changes include
     The use of deprecated %~ now emits a warning

in lib/File/
     Carp::Carp("The tied %~ hash has been deprecated");

Now the interesting bit, no difference at all

$^RE_TRIE_MAXBUF = 65536
$~ = 'OUT'
You can't FIRSTKEY with the %~ hash at 
/home/kevin/perl5/perlbrew/perls/perl-5.15.7/lib/5.15.7/ line 382
     ...propagated at 
/home/kevin/perl5/perlbrew/perls/perl-5.15.7/lib/5.15.7/ line 

Q. who do I talk to about




Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About