sub new { my $class = shift; my($from, $to, $label) = @_; my $self = {}; $self->{'from_node'} = $from; $self->{'to_node'} = $to; $self->{'label'} = $label; # which may be undef bless $self, $class; }