Skip Menu |

This queue is for tickets about the Hash-Case CPAN distribution.

Report information
The Basics
Id: 29337
Status: resolved
Priority: 0/
Queue: Hash-Case

People
Owner: Nobody in particular
Requestors: bdimych [...] narod.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: if (!%myhash) seems works wrong
Date: Thu, 13 Sep 2007 13:03:19 +0400
To: bug-Hash-Case [...] rt.cpan.org
From: Dmitry Bolshakoff <bdimych [...] narod.ru>
Environment Linux rhes3-01 2.4.21-20.ELsmp #1 SMP Wed Aug 18 20:46:40 EDT 2004 i686 i686 i386 GNU/Linux perl, v5.8.0 built for i386-linux-thread-multi Hash::Case '1.004' code #!/usr/bin/perl use Hash::Case::Upper; tie my %myhash, 'Hash::Case::Upper'; $myhash{111} = 222; if (!%myhash) { print "\%myhash false\n"; } else { print "\%myhash true\n"; } Prints “%myhash false“ – error ? -- with best regards Dmitry Bolshakoff
Subject: Re: [rt.cpan.org #29337] if (!%myhash) seems works wrong
Date: Thu, 13 Sep 2007 12:02:26 +0200
To: Dmitry Bolshakoff via RT <bug-Hash-Case [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Dmitry Bolshakoff via RT (bug-Hash-Case@rt.cpan.org) [070913 09:05]: Show quoted text
> Thu Sep 13 05:05:47 2007: Request 29337 was acted upon. > Transaction: Ticket created by bdimych@narod.ru > Queue: Hash-Case > Subject: if (!%myhash) seems works wrong
Show quoted text
> perl, v5.8.0 built for i386-linux-thread-multi > Hash::Case '1.004'
When I run use Test::More tests => 4; use Hash::Case::Upper; tie my %c, 'Hash::Case::Upper'; is((%c ? 'yes' : 'no'), 'no', 'empty'); is((!%c ? 'yes' : 'no'), 'yes', 'empty'); $c{111} = 222; is((%c ? 'yes' : 'no'), 'yes', 'not empty'); is((!%c ? 'yes' : 'no'), 'no', 'not empty'); on perl5.8.8, then all tests succeed. Hash::Case depends for most of its behavior on Tie::StdHash, which is part of the perl distribution... and may have improved since your 5.8.0 You may try "if(! keys $myhash)" as work-around. Tell me if that helps. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #29337] if (!%myhash) seems works wrong
Date: Fri, 05 Oct 2007 01:10:13 +0400
To: "Mark Overmeer via RT" <bug-Hash-Case [...] rt.cpan.org>
From: Dmitry Bolshakoff <bdimych [...] narod.ru>
perl5.8.8 on cygwin if (!%myhash) - ok if(! keys %myhash) - ok and on 5.8.0 and on 5.8.8 many thanks -- with best regards Dmitry Bolshakoff Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=29337 > > > * Dmitry Bolshakoff via RT (bug-Hash-Case@rt.cpan.org) [070913 09:05]: >
> > Thu Sep 13 05:05:47 2007: Request 29337 was acted upon. > > Transaction: Ticket created by bdimych@narod.ru > > Queue: Hash-Case > > Subject: if (!%myhash) seems works wrong
> >
> > perl, v5.8.0 built for i386-linux-thread-multi > > Hash::Case '1.004'
> > When I run > > use Test::More tests => 4; > use Hash::Case::Upper; > > tie my %c, 'Hash::Case::Upper'; > is((%c ? 'yes' : 'no'), 'no', 'empty'); > is((!%c ? 'yes' : 'no'), 'yes', 'empty'); > $c{111} = 222; > is((%c ? 'yes' : 'no'), 'yes', 'not empty'); > is((!%c ? 'yes' : 'no'), 'no', 'not empty'); > > on perl5.8.8, then all tests succeed. Hash::Case depends for > most of its behavior on Tie::StdHash, which is part of the > perl distribution... and may have improved since your 5.8.0 > > You may try "if(! keys $myhash)" as work-around. Tell me if that > helps. > > > -- > Regards, > MarkOv > > ------------------------------------------------------------------------ > Mark Overmeer MSc MARKOV Solutions > Mark@Overmeer.net solutions@overmeer.net > http://Mark.Overmeer.net http://solutions.overmeer.net > >
still had to close this ticket.