Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Help! Overloading operators doesn't work

by mascip (Pilgrim)
on Sep 01, 2012 at 11:58 UTC ( #991149=note: print w/replies, xml ) Need Help??


in reply to Re: Help! Overloading operators doesn't work
in thread [solved] Help! Overloading operators doesn't work

You're right, it's because of namespace::autoclean

There is an example in the Moose Cookbook, of overloading with Moose : http://search.cpan.org/~stevan/Moose/lib/Moose/Cookbook/Basics/Recipe9.pod
It uses the overloading operator.

According to a namespace::autoclean review, if you use overloading with Moose you should use namespace::sweep instead of namespace::autoclean : "This pragma was written to address some problems with the excellent namespace::autoclean. In particular, namespace::autoclean will remove special symbols that are installed by overload, so you can't use namespace::autoclean on objects that overload Perl operators."

  • Comment on Re^2: Help! Overloading operators doesn't work

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991149]
help
Chatterbox?
LanX has a friend in Berlin who switched to go(lang) and just got a kid ...
[marto]: good morning all
[Corion]: Hi marto ;)
[Discipulus]: Corion ah! you opened a new search path! thanks
[choroba]: LanX No, but they grow and want more!
LanX was conditioned by a female
Discipulus my 'kids' always complain with our car..
[LanX]: true, cars are bad in growing
[marto]: WaitWindow()
[Corion]: Discipulus: You need to respond with 0 to WM_QUERYENDSESSION

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2017-01-17 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (154 votes). Check out past polls.