/usr/share/perl5/Graph/SPTHeapElem.pm is in libgraph-perl 1:0.96-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | package Graph::SPTHeapElem;
use strict;
use vars qw($VERSION @ISA);
use Heap071::Elem;
use base 'Heap071::Elem';
$VERSION = 0.01;
sub new {
my $class = shift;
bless { u => $_[0], v => $_[1], w => $_[2] }, $class;
}
sub cmp {
($_[0]->{ w } || 0) <=> ($_[1]->{ w } || 0) ||
($_[0]->{ u } cmp $_[1]->{ u }) ||
($_[0]->{ u } cmp $_[1]->{ v });
}
sub val {
@{ $_[0] }{ qw(u v w) };
}
1;
|