package Vector2D; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); use overload "-" => \&minus, "+" => \&plus, "*" => \&mult; #### sub drawPoly { my @p = @_; #Array of Vector2Ds my $start_point = pop( @p ); while( pop( @p ) ) { $can->create( 'line', $start_point->getx(), $start_point->gety(), $_->getx(), $_->gety()); $start_point = $_; } } #### while( pop( @p ) ) {