in reply to Create a class with mutiple datatypes

I would suggest that, rather than have a single class defining all of the other data types, you declare a single class of your own, utilising the Composite pattern.

CPAN contains numerous existing class implementations - some of which may be suitable for your purpose - for inclusion in the composing class. However, if there's nothing suitable, roll your own class (see perlmodlib & perlmod) for each data type in which you're interested and include that in your composing class.

A user level that continues to overstate my experience :-))
  • Comment on Re: Create a class with mutiple datatypes