in reply to Typeglob substitution in objects based typeglob
Fictional module IO::Socket::WhatEver returns its own typeglob which can be used as IO::Socket::INET object or tcp socket
A IO::Socket::INET object is a socket handle.
print($socket ...); # Use as socket/file handle send($socket, ...); # Use as socket/file handle $socket->print(...); # Use as object $socket->send(...); # Use as object
If that's the purpose of IO::Socket::WhatEver, then you don't need it. ( After reading more, I see that's not the purpose. ) If IO::Socket::WhatEver also does other things, you need to inherit from IO::Handle, perhaps via IO::Socket::INET. Keep in mind the variable around which the object is based is a glob, not a hash. ( Yup, that's what you'll have to do. )
|
|---|