Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: When numeric conversion overloading goes awry.

by dragonchild (Archbishop)
on Jan 24, 2006 at 19:34 UTC ( #525297=note: print w/replies, xml ) Need Help??


in reply to When numeric conversion overloading goes awry.

Submit the following patch to the maintainer of Error.pm:
-exists $self->{'-value'} ? $self->{'-value'} : undef; +exists $self->{'-value'} ? $self->{'-value'} : 0;
The bug is that 0+ should always return something that is a number. Undef, as you've discovered, isn't a number.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: When numeric conversion overloading goes awry.
by dmitri (Priest) on Jan 25, 2006 at 16:25 UTC
    That will technically work. Semantically, however, this may lead to problems -- I think SOAP::Serializer relies on this technique to generate unique IDs for objects. If there are two such Error objects, SOAP::Serializer may get confused. I will file a bug in Error.pm's CPAN page, however, as yours is a valid point.
      Then that's a bug in Soap::Serializer. UIDs are a well-studied space with UUID and Data::UUID simply being two modules I've personally used. That should be filed, as well.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://525297]
help
Chatterbox?
[Corion]: marioroy: Oh, that's always cool, having API-compatible modules. This makes testing and comparing things much easier
[marioroy]: IPC in MCE::Shared can handle 400k (sends) per second. That's seems a lot for being a pure-Perl module. After making the release, will come back and post a solution for a node by a fellow wanting faster logging.
[Corion]: While working on WWW::Mechanize:: Chrome, I had the suspicion that AnyEvent was doing something wrong, but I was able to swap it out for Mojolicious and the error persisted.
[Corion]: Of course, the error was in my own code ;)
[marioroy]: Corion, start and start_child in MCE::Hobo::Manager return a MCE::Hobo object, whereas P::FM returns the PID. I can have it return the PID though. I tried Hobo::Manager with several P::FM modules, just changed P::FM to MCE::Hobo::Manager and it works.
[marioroy]: I also have a Hobo driver for Forklift allowing folks to use in multiple classes, no conflicts with one another. That's not possible for P::FM.
[Discipulus]: congrats marioroy!

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2017-05-26 08:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?