Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Overloading > Public Overload Functions

13.7. Public Overload Functions

As of the 5.6 release of Perl, the use overload pragma provides the following functions for public consumption.


overload::StrVal( OBJ )

This function returns the string value that OBJ would have in absence of stringification overloading ("").


overload::Overloaded( OBJ )

This function returns a true value if OBJ is subject to any operator overloading at all, and false otherwise.


overload::Method( OBJ, OPERATOR )

This function returns a reference to whatever code implements the overloading for OPERATOR when it operates on OBJ, or undef if no such overloading exists.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint