From fb7042bb441677d5ad092c7afc367d0d1220b9ba Mon Sep 17 00:00:00 2001 From: Ed J Date: Sun, 17 Nov 2024 05:16:11 +0000 Subject: [PATCH] better varname in PP as is basename, not a prefix --- Basic/lib/PDL/PP.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Basic/lib/PDL/PP.pm b/Basic/lib/PDL/PP.pm index 6f0b6d843..67abc96bf 100644 --- a/Basic/lib/PDL/PP.pm +++ b/Basic/lib/PDL/PP.pm @@ -507,12 +507,12 @@ use Carp; sub nopm { $::PDLPACK eq 'NONE' } # flag that we don't want to generate a PM sub import { - my ($mod,$modname, $packname, $prefix, $callpack, $multi_c) = @_; + my ($mod,$modname, $packname, $base, $callpack, $multi_c) = @_; # Allow for users to not specify the packname - ($packname, $prefix, $callpack) = ($modname, $packname, $prefix) + ($packname, $base, $callpack) = ($modname, $packname, $base) if ($packname =~ m|/|); - $::PDLMOD=$modname; $::PDLPACK=$packname; $::PDLPREF=$prefix; + $::PDLMOD=$modname; $::PDLPACK=$packname; $::PDLBASE=$base; $::CALLPACK = $callpack || $::PDLMOD; $::PDLMULTI_C = $multi_c; # one pp-*.c per function $::PDLOBJ = "PDL"; # define pp-funcs in this package @@ -761,14 +761,14 @@ sub pp_done { sprintf($PDL::PP::header_xs, $::PDLMOD, $::PDLOBJ), $::PDLXS, "\n", $PDL::PP::header_xsboot, $pdl_boot, $user_boot; - _write_file("$::PDLPREF.xs", $text); + _write_file("$::PDLBASE.xs", $text); return if nopm; $::PDLPMISA = "'".join("','",@::PDLPMISA)."'"; $::PDLBEGIN = "BEGIN {\n$::PDLBEGIN\n}" unless $::PDLBEGIN =~ /^\s*$/; $::PDLMODVERSION //= ''; $::FUNCSPOD = $::DOCUMENTED ? "\n\n=head1 FUNCTIONS\n\n=cut\n\n" : ''; - _write_file("$::PDLPREF.pm", join "\n\n", <