summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
Diffstat (limited to 'perl')
-rw-r--r--perl/FromCPAN/Mail/meson.build2
-rw-r--r--perl/FromCPAN/meson.build2
-rw-r--r--perl/Git.pm13
-rw-r--r--perl/Git/LoadCPAN/Mail/meson.build2
-rw-r--r--perl/Git/LoadCPAN/meson.build2
-rw-r--r--perl/Git/SVN/Memoize/meson.build2
-rw-r--r--perl/Git/SVN/meson.build2
-rw-r--r--perl/Git/meson.build2
-rw-r--r--perl/meson.build2
9 files changed, 21 insertions, 8 deletions
diff --git a/perl/FromCPAN/Mail/meson.build b/perl/FromCPAN/Mail/meson.build
index b4ff2fc0b2..467507c5e6 100644
--- a/perl/FromCPAN/Mail/meson.build
+++ b/perl/FromCPAN/Mail/meson.build
@@ -3,6 +3,6 @@ test_dependencies += custom_target(
output: 'Address.pm',
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/FromCPAN/Mail',
+ install_dir: perllibdir / 'FromCPAN/Mail',
depends: [git_version_file],
)
diff --git a/perl/FromCPAN/meson.build b/perl/FromCPAN/meson.build
index 1f9ea6ce8e..720c60283d 100644
--- a/perl/FromCPAN/meson.build
+++ b/perl/FromCPAN/meson.build
@@ -3,7 +3,7 @@ test_dependencies += custom_target(
output: 'Error.pm',
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/FromCPAN',
+ install_dir: perllibdir / 'FromCPAN',
depends: [git_version_file],
)
diff --git a/perl/Git.pm b/perl/Git.pm
index 6f47d653ab..090cf77dab 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1061,6 +1061,19 @@ sub _close_cat_blob {
delete @$self{@vars};
}
+# Given PORT, a port number or service name, return its numerical
+# value else undef.
+sub port_num {
+ my ($port) = @_;
+
+ # Port can be either a positive integer within the 16-bit range...
+ if ($port =~ /^\d+$/ && $port > 0 && $port <= (2**16 - 1)) {
+ return $port;
+ }
+
+ # ... or a symbolic port (service name).
+ return scalar getservbyname($port, '');
+}
=item credential_read( FILEHANDLE )
diff --git a/perl/Git/LoadCPAN/Mail/meson.build b/perl/Git/LoadCPAN/Mail/meson.build
index 89cde56be8..05a5770560 100644
--- a/perl/Git/LoadCPAN/Mail/meson.build
+++ b/perl/Git/LoadCPAN/Mail/meson.build
@@ -3,6 +3,6 @@ test_dependencies += custom_target(
output: 'Address.pm',
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN/Mail',
+ install_dir: perllibdir / 'Git/LoadCPAN/Mail',
depends: [git_version_file],
)
diff --git a/perl/Git/LoadCPAN/meson.build b/perl/Git/LoadCPAN/meson.build
index 1ee915c650..b975d49726 100644
--- a/perl/Git/LoadCPAN/meson.build
+++ b/perl/Git/LoadCPAN/meson.build
@@ -3,7 +3,7 @@ test_dependencies += custom_target(
output: 'Error.pm',
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN',
+ install_dir: perllibdir / 'Git/LoadCPAN',
depends: [git_version_file],
)
diff --git a/perl/Git/SVN/Memoize/meson.build b/perl/Git/SVN/Memoize/meson.build
index 233ec670d7..d6209dc3bf 100644
--- a/perl/Git/SVN/Memoize/meson.build
+++ b/perl/Git/SVN/Memoize/meson.build
@@ -3,6 +3,6 @@ test_dependencies += custom_target(
output: 'YAML.pm',
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/Git/SVN',
+ install_dir: perllibdir / 'Git/SVN/Memoize',
depends: [git_version_file],
)
diff --git a/perl/Git/SVN/meson.build b/perl/Git/SVN/meson.build
index 44abaf42b7..8858985fe8 100644
--- a/perl/Git/SVN/meson.build
+++ b/perl/Git/SVN/meson.build
@@ -13,7 +13,7 @@ foreach source : [
output: source,
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/Git/SVN',
+ install_dir: perllibdir / 'Git/SVN',
depends: [git_version_file],
)
endforeach
diff --git a/perl/Git/meson.build b/perl/Git/meson.build
index b21fa5591e..a61b7b1f4a 100644
--- a/perl/Git/meson.build
+++ b/perl/Git/meson.build
@@ -10,7 +10,7 @@ foreach source : [
output: source,
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5/Git',
+ install_dir: perllibdir / 'Git',
depends: [git_version_file],
)
endforeach
diff --git a/perl/meson.build b/perl/meson.build
index 2d4ab1c4a9..3c66b007ea 100644
--- a/perl/meson.build
+++ b/perl/meson.build
@@ -3,7 +3,7 @@ test_dependencies += custom_target(
output: 'Git.pm',
command: generate_perl_command,
install: true,
- install_dir: get_option('datadir') / 'perl5',
+ install_dir: perllibdir,
depends: [git_version_file],
)