Re: Problem with function overloading

2007-08-04 Thread I don't like SPAM
Hello Tom, thank you very much for your attention! > > eval "require $moduleName"; > > Hm. You say this isn't working for you, but you're not checking the > value of $@ after the evil eval? Ok, you got me :) I did not know $@ - I'll go for it. Promised! Anyway - I'm not sure, whether t

Re: Problem with function overloading

2007-08-02 Thread Tom Phoenix
On 7/29/07, I don't like SPAM <[EMAIL PROTECTED]> wrote: > eval "require $moduleName"; Hm. You say this isn't working for you, but you're not checking the value of $@ after the evil eval? (By the way, unless I missed something, that "require" could load your module, if it loads it at all

Problem with function overloading

2007-07-29 Thread I don't like SPAM
Hello, I have an quite outdated perl-app, that does not work any more. It consists of various objects and a simple plugin-interface. All "static" objects work well, even with function overloading. The plugin-objects do not work as expected any more. I hope, someone can shine me a ligh

Re: [PATCH] Test that constant overloading is propagated into eval

2005-12-27 Thread Adriano Ferreira
On 12/26/05, Robin Houston <[EMAIL PROTECTED]> wrote: > +# Check that constant overloading propagates into evals As a further confirmation of the fact, the following one-liner (using bigint and eval with strings) that used to output $ perl -Mbigint -e "my $x = eval '1+2

Re: Term Overloading

2002-12-27 Thread Rob Dixon
Hi Paul Operator overloading is using the same operator to serve for multiple data types. For instance a language that differentiated between string and numeric data may overload the '+' operator to perform string concatenation. It is frequently used in object-oriented programming to

RE: Term Overloading

2002-12-27 Thread Kipp, James
Read Chapter 13 > -Original Message- > From: Paul Kraus [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 27, 2002 2:26 PM > To: 'Perl' > Subject: Term Overloading > > > Programming Perl makes many references to overloading something. For > in

Term Overloading

2002-12-27 Thread Paul Kraus
Programming Perl makes many references to overloading something. For instance overloading the angle brackets. What does this term mean. I am assuming it just mean changing the default behavior but I wanted to make sure. Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216

Re: Overloading

2001-06-03 Thread Richard Hulse
Jeff, I have sussed it. Page 353 of the Camel book says of the += operator "the result is assigned to the left hand operand..." The result of the '+ 1' method call is that a number in $self is modified. The last line of the method is: $self->{_time_offset} = $offset; ...which is fine until t

Re: Overloading

2001-06-03 Thread Richard Hulse
Hi Jeff, Thanks. According to the man pages Perl automatically substitutes + for += without fallback. The problem is that even if I substitute the += method for + it still doesn't work. Somehow $obj gets turned into the offset amount. I have spent several hours with the debugger trying to fin

Re: Overloading

2001-06-03 Thread Jeff Pinyan
On Jun 3, Richard Hulse said: >I have a module which overloads a few operators > >snippet: >use overload > "+" => \&addoffset, > "-" => \&subtractoffset, > q("") => \&printit; > >Even if I allow Perl to magically make the += happen for me it still does >the same (wrong) thing. Are y

Overloading

2001-06-03 Thread Richard Hulse
I have a module which overloads a few operators snippet: use overload "+" => \&addoffset, "-" => \&subtractoffset, q("") => \&printit; the functions are called OK when I code: $obj + 7; print $obj; ...although I get a Perl warning saying addition is useless which I would expect