Getopt-LL

 view release on metacpan or  search on metacpan

lib/Getopt/LL/DLList/Node.pm  view on Meta::CPAN

# $Id: Node.pm,v 1.9 2007/07/13 00:00:15 ask Exp $
# $Source: /opt/CVS/Getopt-LL/lib/Getopt/LL/DLList/Node.pm,v $
# $Author: ask $
# $HeadURL$
# $Revision: 1.9 $
# $Date: 2007/07/13 00:00:15 $
package Getopt::LL::DLList::Node;
use strict;
use warnings;
use Carp;
use Scalar::Util qw( weaken );
use version; our $VERSION = qv('1.0.0');
use 5.006_001;
{

    use vars qw($ALLOCATED_TOTAL);
    $ALLOCATED_TOTAL = 0;

    use Class::Dot qw( property isa_Object isa_Data );
    property    prev => isa_Object();
    property    next => isa_Object();

lib/Getopt/LL/DLList/Node.pm  view on Meta::CPAN

            $self->set_data($opt_data);
        }

        return $self;
    }

    sub free {
        my ($self) = @_;
        my $next = $self->next;
        my $prev = $self->prev;
        weaken $next;
        weaken $prev;
        undef $self->{next};
        undef $self->{prev};
        undef $self->{data};

        # Class::Dot 1.0 weirdness.
        undef $self->{__x__next__x__};
        undef $self->{__x__prev__x__};
        undef $self->{__x__data__x__};
        return;
    }



( run in 0.855 second using v1.01-cache-2.11-cpan-65fba6d93b7 )