/usr/share/perl5/graphincludes/project/default.pm is in libdeps-perl 0.13-1.1.
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | # This file is part of the DEPS/graph-includes package
#
# (c) 2005,2006 Yann Dirson <ydirson@altern.org>
# Distributed under version 2 of the GNU GPL.
package graphincludes::project::default;
use strict;
use warnings;
use base qw(graphincludes::project);
use Hash::Util qw(lock_keys unlock_keys);
use File::Spec::Functions qw(splitpath);
use graphincludes::params;
sub new {
my $class = shift;
my $self;
$self = $class->SUPER::new(@_);
unlock_keys(%$self);
bless ($self, $class);
$self->{IGNOREDDEPS} = $self->ignored_deps();
lock_keys(%$self);
return $self;
}
sub nlevels { return 2; }
sub filelabel {
my $self = shift;
my ($file,$level) = @_;
$level = $graphincludes::params::minshow unless defined $level;
$file =~ s/^$self->{PFXSTRIP}// if defined $self->{PFXSTRIP};
if ($level == 0) {
return $file;
} elsif ($level == 1) {
$file =~ s/\.[^.]*$//;
return $file;
} elsif ($level == 2) {
(undef, my $dirname, my $filename) = splitpath($file);
if ($dirname ne '') {
return $dirname;
} else {
return '<' . $self->filelabel($file, $level - 1) . '>';
}
}
return undef;
}
sub defaultcolors {
return ();
}
sub ignored_deps {
return {};
}
sub special_edge {
my $self = shift;
my ($src, $dst) = @_;
my $lbl = $self->{IGNOREDEDGES}->{$src}->{$dst};
my $special = $self->SUPER::special_edge($src,$dst);
if (defined $lbl) {
$special->{color} = 'gray';
$special->{constraint} = 'false';
$special->{label} = [ $lbl ];
}
return $special;
}
1;
|