Re: [Pdl-devel] I think the problem here is PDL's, not mine...

2022-02-13 Thread Ed .
Let’s call it a concatenation of circumstances: latest PDL is careful to insert a newline before any Code section in the generated C to protect from this sort of thing having stumbled over it, and the various pp_addpm / pp_line_numbers are also careful to do so. If you are rolling your own versi

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread Ed .
Hi all, I’ve just uploaded 2.020 of PDL::Graphics::Gnuplot featuring Zaki’s excellent fix for this problem. Ingo, if your users were to use perlbrew to have an individual Perl installation and set of libraries, then they would have much greater reproducibility of results as only they could upd

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread Zakariyya Mughal
On 2022-02-13 at 23:16:12 +0100, Ingo Schmid wrote: > Well, it is several machines for several users, not that many. We don't > have formal admins and developers, we just do. It's called science. ;) > And I have used it for years and this is one of the rare occasions where > it causes troubles. >

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread Ingo Schmid
Well, it is several machines for several users, not that many. We don't have formal admins and developers, we just do. It's called science. ;) And I have used it for years and this is one of the rare occasions where it causes troubles. Out of curiosity, how do manage modules? Ingo On 2/13/2022 1

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread David Mertens
Ingo, It sounds like you are the system administrator for your machines? That is the only situation in which I would consider using sudo cpanm. David On Sun, Feb 13, 2022 at 11:11 AM Ingo Schmid wrote: > Hi Ed, > > I see what you mean. But then it is just me having access to those modules > an

Re: [Pdl-devel] I think the problem here is PDL's, not mine...

2022-02-13 Thread David Mertens
Oh! Hahaha, so this is almost certainly my problem and not PDL's! Sorry for the noise. Oddly, I use pp_line_numbers elsewhere in this module's PP code, but not for the bad code in this function. Thanks! David On Sun, Feb 13, 2022, 8:32 AM Ed . wrote: > I think the latest PDL’s pp_line_numbers d

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread Ingo Schmid
Hi Ed, I see what you mean. But then it is just me having access to those modules and not other users. Are you suggesting it is best practice to install perl modules per user? That requires a lot of redundant work if you have a group using the software. I suppose in the particular case, catching

Re: [Pdl-devel] I think the problem here is PDL's, not mine...

2022-02-13 Thread Ed .
I think the latest PDL’s pp_line_numbers does all this stuff for you (partly because as I’ve enhanced it, I’ve occasionally made mistakes and broken others’ modules, often yours in fact!). My reading of your Prima/Util.xs.PL is it has a hand-rolled pp_line_numbers-ish manual “#line”. That’s up t

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread Ed .
Hi Ingo, cpanm is certainly the best tool for installing Perl modules! But if you’re in a package-managed environment and want to use the system Perl (which is understandable, it’s very stable), then current best practice is to not install any non-package-managed modules in the system location.

Re: [Pdl-devel] I think the problem here is PDL's, not mine...

2022-02-13 Thread David Mertens
Heh, so the problem might be "mine" insofar as I implemented pp_line_numbers... I wonder if there's is a backslash on the previous line causing this. If that were the case, I should be able to fix it by prepending a newline to the string constructed by pp_line_numbers. Maybe I'll try a dev release

Re: [Pdl-devel] PDL::Graphics::Simple

2022-02-13 Thread Ingo Schmid
Hi Zaki, thank you for the suggestion. Yes, that is exactly the issue. The question to me is rather, if this is desired. Who runs an X session as root ? Isn't using cpanm the way to maintain Perl modules these days? I will open an issue and I have a hunch this could easily be caught during build.