This queue is for tickets about the Proc-ProcessTable-Colorizer CPAN distribution.

Report information
The Basics
Id:
123531
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
SREZIC [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.0.0
Fixed in:
0.1.0



Subject: "use BSD::Process" is problematic
The lines https://metacpan.org/source/VVELOX/Proc-ProcessTable-Colorizer-0.0.0/lib/Proc/ProcessTable/Colorizer.pm#L12-14 are problematic --- "use" is a compile-time statement which is always executed, even if there's a surrounding if. You have to use instead "require" or put the statement in a BEGIN+eval combination. Also, BSD::Process does not even work for most BSD systems, see here: http://matrix.cpantesters.org/?dist=BSD-Process%200.07 . Actually there are only pass reports for freebsd8. The test suite fails with freebsd9 and freebsd10. And there are compilation errors with freebsd11 and later.
On Mon Nov 06 12:37:11 2017, SREZIC wrote:
Show quoted text
> The lines https://metacpan.org/source/VVELOX/Proc-ProcessTable- > Colorizer-0.0.0/lib/Proc/ProcessTable/Colorizer.pm#L12-14 are > problematic --- "use" is a compile-time statement which is always > executed, even if there's a surrounding if. You have to use instead > "require" or put the statement in a BEGIN+eval combination. > > Also, BSD::Process does not even work for most BSD systems, see here: > http://matrix.cpantesters.org/?dist=BSD-Process%200.07 . Actually > there are only pass reports for freebsd8. The test suite fails with > freebsd9 and freebsd10. And there are compilation errors with > freebsd11 and later.
Howdy! Thanks for the heads up about require v. use. Yeah, sadly the author for BSD::Process seems to be a bit unresponsive. It is patched in the FreeBSD ports tree though. 11 is actually what I developed this on.
Used require in 0.1.0 and pushed it on out. On Mon Nov 06 12:37:11 2017, SREZIC wrote:
Show quoted text
> The lines https://metacpan.org/source/VVELOX/Proc-ProcessTable- > Colorizer-0.0.0/lib/Proc/ProcessTable/Colorizer.pm#L12-14 are > problematic --- "use" is a compile-time statement which is always > executed, even if there's a surrounding if. You have to use instead > "require" or put the statement in a BEGIN+eval combination. > > Also, BSD::Process does not even work for most BSD systems, see here: > http://matrix.cpantesters.org/?dist=BSD-Process%200.07 . Actually > there are only pass reports for freebsd8. The test suite fails with > freebsd9 and freebsd10. And there are compilation errors with > freebsd11 and later.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.