/usr/share/perl5/ExtUtils/Helpers.pm is in libextutils-helpers-perl 0.022-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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | package ExtUtils::Helpers;
$ExtUtils::Helpers::VERSION = '0.022';
use strict;
use warnings FATAL => 'all';
use Exporter 5.57 'import';
use Config;
use File::Basename qw/basename/;
use File::Spec::Functions qw/splitpath canonpath abs2rel splitdir/;
use Module::Load;
our @EXPORT_OK = qw/make_executable split_like_shell man1_pagename man3_pagename detildefy/;
BEGIN {
my %impl_for = ( MSWin32 => 'Windows', VMS => 'VMS');
my $package = 'ExtUtils::Helpers::' . ($impl_for{$^O} || 'Unix');
load($package);
$package->import();
}
sub man1_pagename {
my $filename = shift;
return basename($filename).".$Config{man1ext}";
}
my %separator = (
MSWin32 => '.',
VMS => '__',
os2 => '.',
cygwin => '.',
);
my $separator = $separator{$^O} || '::';
sub man3_pagename {
my ($filename, $base) = @_;
$base ||= 'lib';
my ($vols, $dirs, $file) = splitpath(canonpath(abs2rel($filename, $base)));
$file = basename($file, qw/.pm .pod/);
my @dirs = grep { length } splitdir($dirs);
return join $separator, @dirs, "$file.$Config{man3ext}";
}
1;
# ABSTRACT: Various portability utilities for module builders
__END__
=pod
=encoding utf-8
=head1 NAME
ExtUtils::Helpers - Various portability utilities for module builders
=head1 VERSION
version 0.022
=head1 SYNOPSIS
use ExtUtils::Helpers qw/make_executable split_like_shell/;
unshift @ARGV, split_like_shell($ENV{PROGRAM_OPTS});
write_script_to('Build');
make_executable('Build');
=head1 DESCRIPTION
This module provides various portable helper functions for module building modules.
=head1 FUNCTIONS
=head2 make_executable($filename)
This makes a perl script executable.
=head2 split_like_shell($string)
This function splits a string the same way as the local platform does.
=head2 detildefy($path)
This function substitutes a tilde at the start of a path with the users homedir in an appropriate manner.
=head2 man1_pagename($filename)
Returns the man page filename for a script.
=head2 man3_pagename($filename, $basedir)
Returns the man page filename for a Perl library.
=head1 ACKNOWLEDGEMENTS
Olivier Mengué and Christian Walde made C<make_executable> work on Windows.
=head1 AUTHORS
=over 4
=item *
Ken Williams <kwilliams@cpan.org>
=item *
Leon Timmermans <leont@cpan.org>
=back
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2004 by Ken Williams, Leon Timmermans.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
|