# $Id: TicTacToe.pm,v 1.1.1.1 2008/10/12 04:05:34 alamos Exp $ # The state is in an array package TicTacToe; use strict; use TicTacToe::Player 1.0; use base qw(Exporter); use vars qw($VERSION); $VERSION='1.0'; my($player); BEGIN { print "Let the game begin!\n"; $player = TicTacToe::Player->new(); } CHECK { defined($player) || die "Player undefined."; } INIT { $player->play(); } END { print "It's been a pleasure knowing you!\n"; # Cause the player to be garbage-collected. undef $player; } ## This is here because a module must return a value 1;