1 |
From: Kent Fredric <kentnl@g.o> |
2 |
|
3 |
--- |
4 |
eclass/perl-functions.eclass | 18 ++++++++++++++++++ |
5 |
1 file changed, 18 insertions(+) |
6 |
|
7 |
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass |
8 |
index 027cb0cf7e..3f73ac87c7 100644 |
9 |
--- a/eclass/perl-functions.eclass |
10 |
+++ b/eclass/perl-functions.eclass |
11 |
@@ -431,3 +431,21 @@ perl_get_module_version() { |
12 |
print ${$stash->{VERSION}}; |
13 |
exit 0; ' "$@" |
14 |
} |
15 |
+ |
16 |
+# @FUNCTION: perl_get_raw_vendorlib |
17 |
+# @USAGE: perl_get_raw_vendorlib |
18 |
+# @DESCRIPTION: |
19 |
+# Convenience function to optimise for a common case without double-handling |
20 |
+# variables everywhere. |
21 |
+# |
22 |
+# Note: Will include EPREFIX where relevant |
23 |
+perl_get_raw_vendorlib() { |
24 |
+ debug-print-function $FUNCNAME "$@" |
25 |
+ |
26 |
+ [[ $# -lt 0 ]] || die "${FUNCNAME}: Too many parameters ($#)" |
27 |
+ |
28 |
+ perl -MConfig \ |
29 |
+ -e'exists $Config{$ARGV[0]} || die qq{No such Config key "$ARGV[0]"}; |
30 |
+ print $Config{$ARGV[0]}; |
31 |
+ exit 0' -- "installvendorlib" || die "Can't extract installvendorlib from Perl Configuration" |
32 |
+} |
33 |
\ No newline at end of file |
34 |
-- |
35 |
2.11.0 |