#!/usr/bin/perl

use strict;

{
    package Generic;

    sub new {
	my $class = shift;
	my $self = {};
	bless($self, $class);
	return $self;
    }

    our $AUTOLOAD;
    sub AUTOLOAD {
	my ($self, $val) = @_;
	$self->{$AUTOLOAD} = $val if ($val);
	return $self->{$AUTOLOAD};
    }

    1;
}

my $r = Generic->new();
$r->title('girl');
$r->name('Ruby');
$r->lacks('pretty');
$r->question('when will you be mine');

print("I've got a ", $r->title(), " and ", $r->name(), " is her name\n",
      "She ain't real ", $r->lacks(), " but I love her just the same\n",
      $r->name(), " ", $r->name(), " ", $r->question(), "?\n");

