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
From:
kevin dawson
Date:
January 26, 2012 12:04
Subject:
Re: patch for perl5db -> You can t FIRSTKEY with the %~ hash
Message ID:
4F21B1CC.4000001@btclick.com
On 24/01/12 19:48, Ricardo Signes wrote:
> * kevin dawson<kevin.dawson@btclick.com>  [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
> dumpvar.pl 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 dumpvars.pl 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?
>
Ricardo

thank you very much for the kick.

put my head in the books per say and know understand your response.

Q1,    I know understand my patch was a quick hack, but the issue is 
that perl -d will still die, could in not just warn instead?

Q2,    perl5db.pl still needs to have it's changes added, including 
those that did not make the delta.


# Changes: 1.34:
#    + ... see delta 5.15.0-5
# Changes: 1.35:
#    perl5.15.6 leading single quot changed from ` to ' #not in delta
#    + ... see delta 5.15.6
# Changes: 1.36:
#    + ... see delta 5.15.7

regards
bowtie

nb

5.14.2 => v1.33
5.15.0 => v1.34
5.15.1 => v1.34
5.15.2 => v1.34
5.15.3 => v1.34
5.15.4 => v1.34
5.15.5 => v1.34
5.15.6 => v1.35
5.15.7 => v1.36

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