M
Michele Dondi
I must say in advance that I know the most basic aspects of OO
programmin in Perl, but I've never been really proficient with it. So
pardon my ignorance...
It is often said that the reference that gets bless()ed to create an
object is one to an anonymous hash, which makes perfectly sense, as
the examples abunding everywhere clearly indicate.
I've also seen bless()ing something like an empty {array,hash}ref to
be used "solely" as an index into a package/class global hash to
enforce some degree of encapsulation.
Now I wonder if there are common/cool/smart/witty cases in which it is
natural to use a reference to some other kind of object, like e.g. a
sub, or filehandle, etc.
Michele
programmin in Perl, but I've never been really proficient with it. So
pardon my ignorance...
It is often said that the reference that gets bless()ed to create an
object is one to an anonymous hash, which makes perfectly sense, as
the examples abunding everywhere clearly indicate.
I've also seen bless()ing something like an empty {array,hash}ref to
be used "solely" as an index into a package/class global hash to
enforce some degree of encapsulation.
Now I wonder if there are common/cool/smart/witty cases in which it is
natural to use a reference to some other kind of object, like e.g. a
sub, or filehandle, etc.
Michele