#!/usr/bin/perl -wI .
use strict;

#since we save modules for testing in the current working directory and
# Perl does not include this directory in its search path we add it 
# into the search path in the shebang line above, with the 
# I . which includes dot

use AutoInc;	#import our special type

tie my $x,"AutoInc"; #declare $x and make of the tied class

for (my $i=0;$i<10;$i++) {
  print "$x ";	#prints "0 1 2 3 ..9
}

$x = 1000;	#set the value to 1000
for (my $i=0;$i<10;$i++) {
  print "$x ";	#prints "1000 1002 .. 1009
}
