Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: How can I inherit from Bit::Vector?

by toma (Vicar)
on Nov 05, 2001 at 04:17 UTC ( [id://123244]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: How can I inherit from Bit::Vector?
in thread How can I inherit from Bit::Vector?

Thanks for the help!

Still, it seems that Bit::Vector seems designed not to allow inheritance. Almost all the methods, such as shift_left(), check to see that they are handed a genuine Bit::Vector. If it isn't a Bit::Vector an error is generated.

I'm beginning to think that I need to use a different strategy. Perhaps I should make an object that has a USES_A rather than an IS_A relationship with Bit:Vector.

It should work perfectly the first time! - toma

  • Comment on Re: Re: Re: How can I inherit from Bit::Vector?

Replies are listed 'Best First'.
Re: Re: Re: Re: How can I inherit from Bit::Vector?
by Fastolfe (Vicar) on Nov 05, 2001 at 04:21 UTC
    Yah that approach would probably be best.

    I'd still be interested in hearing why the author chose to go through all of these hoops to prevent someone from inheriting Bit::Vector. This almost seems a bit silly.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://123244]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found