lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/Helpers.pm in javonet-ruby-sdk-2.4.8 vs lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/ExtUtils/Helpers.pm in javonet-ruby-sdk-2.4.9
- old
+ new
@@ -1,7 +1,7 @@
package ExtUtils::Helpers;
-$ExtUtils::Helpers::VERSION = '0.027';
+$ExtUtils::Helpers::VERSION = '0.028';
use strict;
use warnings FATAL => 'all';
use Exporter 5.57 'import';
use Config;
@@ -17,12 +17,13 @@
require "ExtUtils/Helpers/$impl.pm";
"ExtUtils::Helpers::$impl"->import();
}
sub man1_pagename {
- my $filename = shift;
- return basename($filename).".$Config{man1ext}";
+ my ($filename, $ext) = @_;
+ $ext ||= $Config{man1ext};
+ return basename($filename).".$ext";
}
my %separator = (
MSWin32 => '.',
VMS => '__',
@@ -30,16 +31,17 @@
cygwin => '.',
);
my $separator = $separator{$^O} || '::';
sub man3_pagename {
- my ($filename, $base) = @_;
+ my ($filename, $base, $ext) = @_;
$base ||= 'lib';
+ $ext ||= $Config{man3ext};
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}";
+ return join $separator, @dirs, "$file.$ext";
}
1;
# ABSTRACT: Various portability utilities for module builders
@@ -54,11 +56,11 @@
ExtUtils::Helpers - Various portability utilities for module builders
=head1 VERSION
-version 0.027
+version 0.028
=head1 SYNOPSIS
use ExtUtils::Helpers qw/make_executable split_like_shell/;
@@ -82,14 +84,14 @@
=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)
+=head2 man1_pagename($filename, $ext = $Config{man1ext})
Returns the man page filename for a script.
-=head2 man3_pagename($filename, $basedir)
+=head2 man3_pagename($filename, $basedir = 'lib', $ext = $Config{man3ext})
Returns the man page filename for a Perl library.
=head1 ACKNOWLEDGEMENTS