/usr/share/perl5/Debian/LicenseReconcile/Utils.pm is in license-reconcile 0.14.
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 | package Debian::LicenseReconcile::Utils;
use 5.006;
use strict;
use warnings;
use base qw(Exporter);
use File::Find;
our @EXPORT_OK = qw(get_files);
sub get_files {
my $directory = shift;
my @files = ();
find(sub {
return if -d $_; # avoids warnings with substr() for $_ eq $directory
my $shortenedname = substr($File::Find::name,length($directory)+1);
return if $shortenedname =~ m{\A(?:\.git|\.svn|\.pc)};
push @files, $shortenedname;
}, $directory);
return sort @files;
}
=head1 NAME
Debian::LicenseReconcile::Utils - various just about describable utilities
=head1 VERSION
Version 0.14
=cut
our $VERSION = '0.14';
=head1 SYNOPSIS
use Debian::LicenseReconcile::Utils qw(get_files);
my @files = get_files($directory);
=head1 SUBROUTINES/METHODS
=head2 get_files
Takes a directory and returns a list of all the files in that directory and below.
=head1 AUTHOR
Nicholas Bamber, C<< <nicholas at periapt.co.uk> >>
=head1 LICENSE AND COPYRIGHT
Copyright 2012 Nicholas Bamber C<< <nicholas at periapt.co.uk> >>.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
=cut
1; # End of Debian::LicenseReconcile
|