/usr/share/perl5/DEPS/Style/Edge/WeightLabel.pm is in libdeps-perl 0.13-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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # This file is part of the DEPS/graph-includes package
#
# (c) 2006 Yann Dirson <ydirson@altern.org>
# Distributed under version 2 of the GNU GPL.
package DEPS::Style::Edge::WeightLabel;
use warnings;
use strict;
use base qw(DEPS::Style);
use Hash::Util qw(lock_keys unlock_keys);
use Carp qw(croak);
sub new {
my $class = shift;
my $self = $class->SUPER::new([], [],
@_);
unlock_keys (%$self);
bless ($self, $class);
lock_keys (%$self);
return $self;
}
# FIXME: should be able to specify the level relative to which counting is done
sub apply {
my $self = shift;
my ($edge, $graphnode, $style) = @_;
my $nedges = $edge->weight;
# FIXME: be more friendly
print STDERR "Warning; overriding label from DEPS::Style::Edge::WeightLabel"
if defined $style->{label};
$style->{label} = "[$nedges]";
return $style;
}
1;
|