Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Thou Shall Not Covet thy Object's Internals

by princepawn (Parson)
on Apr 25, 2001 at 23:39 UTC ( [id://75583]=note: print w/replies, xml ) Need Help??


in reply to Thou Shall Not Covet thy Object's Internals

This why Perl ties are so nice. All you can do is use normal Perl data structrures --- the getting and setting of the actual fields in necessarily hidden.
  • Comment on Re: Thou Shall Not Covet thy Object's Internals

Replies are listed 'Best First'.
Re^2: Thou Shall Not Covet thy Object's Internals
by brian_d_foy (Abbot) on Jan 16, 2006 at 04:15 UTC

    Perl ties don't prevent you from accessing the object data. You can get the object back with tied, or say the return value from tie.

    my $object = tie my $scalar, 'Tie::Scalar::SomethingCool'; my $object2 = tied( $scalar );

    Of course, people have to do a little more work to do that, but the people that want to mess with your internals won't mind the work.

    --
    brian d foy <brian@stonehenge.com>
    Subscribe to The Perl Review

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-09-16 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.