All pastes #746039 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-22 22:15 UTC
rendered paste body
package Nonsense::InsideOut;
use strict;
use warnings;
use Class::Std::Utils;
{
    my %name_of = ();

    sub new {
        my ($class) = shift;

        my $self = bless \do{my $anon_scalar}, $class;
        return $self;
    }

    sub get_name {
        my ($self) = shift;
        return $name_of{ident $self};
    }

    sub set_name {
        my ($self) = shift;
        my ($name) = shift;
        $name_of{ident $self} = $name;
    }
}

1;