The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Module::Generic::Tie - Object Access Control Class

SYNOPSIS

    my $o = My::Object->new;
    tie( $o, 'Module::Generic::Tie', readonly => 1, perms => 4 );
    # Attempting to change the debug level directly
    $o->{debug} = 1;
    # This fails, because the object is set with read only permision
    # but this below will succeed
    $o->debug( 1 );

DESCRIPTION

Given an object, and a set of parameters, this will restrict direct access to the object values, ensuring the object properties can only be modified from within the class/package if necessary.

This is used in "new" in Module::Generic using your module global variable OBJECT_PERMS which should contain a unix permission which is a number from 1 to 7 representing a combinatin of 1 for execution, 2 for write privilege and 4 for read privilege

METHODS

No method is available

AUTHOR

Jacques Deguest <jack@deguest.jp>

COPYRIGHT & LICENSE

Copyright (c) 2000-2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.