That would be just fine.
Apart from people doing UNIVERSAL::isa(...) checks, which they shouldn't
be doing anyway, adding a custom isa would make things work properly.
WRT subclassing, I wasn't sure if you had a replacement for every single
method, and thus it might not cause a problem in that case.
But if it would, then sub isa { ... } is ok.
Adam K
IO-String wrote:
Show quoted text> Greetings,
> This message has been automatically generated in response to your bug report about IO-String, a summary of which appears below.
>
> There is no need to reply to this message right now. Your bug in IO-String has been assigned an ID of [cpan #16756]. Please include the string:
>
> [cpan #16756]
>
> in the subject line of all future correspondence about this issue. To do so,
> you may reply to this message.
>
> Thank you,
> bug-IO-String@rt.cpan.org
>
> -------------------------------------------------------------------------
> Even though it would not inherit any methods (right?) from them, should IO::String be a subclass of IO::Handle or (preferably) IO::Seekable so that parameter validation works?
>
> Currently I get the following...
>
> main::(-e:1): 1
> DB<1> use IO::String
>
> DB<2> x IO::String->isa('IO::Handle')
> 0 ''
> DB<3> x IO::String->isa('IO::Seekable')
> 0 ''
> DB<4>
>
> Is not an actual subclass, and it would cause problems TO actually be a subclass, would something like adding a custom ->isa to return true for IO::Handle and/or IO::Seekable be good enough?