NAME

    fields::aliased - alias members created by the 'fields' pragma

DESCRIPTION

    'fields::aliased' extends the 'fields' pragmatic module to make
    compile-time class fields even easier to use...you get them aliased
    to lexical variables so that you don't have to constantly
    dereference the object within methods. As an example, let's take the
    following inane excerpt of a class named Example:

        package Example;
        use strict;
        use fields qw(scalar array hash);

        ## Constructor
        sub new {
            my $self = fields::new(shift);

            $self->{scalar} = 3;
            $self->{array}  = [];
            $self->{hash}   = {};

            return $self;
        }

        sub sample_method {
            my ($self) = @_;

            $self->{array}[0] = 'yup';
            print $self->{scalar}, "\n";
        }

    The exact same effect could be achieved by the following:

        package Example;
        use strict;
        use fields::aliased qw($scalar @array %hash);

        ## Constructor
        sub new {
            my $self = shift->SUPER::new;
            field vars : $self;

            $scalar = 3;

            return $self;
        }

        sub sample_method {
            field vars : my $self;

            $array[0] = 'yup';
            print $scalar, "\n";
        }

    They perform the same operations, but you don't have to type
    "$self->" before all of the fields. This can make code much easier
    to read, especially for arrays and hashes.

INSTALLATION

    To install this module, use the standard incantation:

        perl Makefile.PL
        make
        make test
        make install

PREREQUISITES

    Perl 5.6

    Tie::IxHash, Filter::Simple, Lexical::Util

COPYRIGHT AND LICENSE

    Copyright 2004 Kevin Michael Vail

    This program is free software. It may be copied and/or redistributed
    under the same terms as Perl itself.

AUTHOR

    Kevin Michael Vail <kevin@vaildc.net>
