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
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
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
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
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
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
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
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
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
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
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
11 matches
Mail list logo