Name : perl-Check-UnitCheck
| |
Version : 0.13
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.9.1
| Date : 2024-07-03 17:50:18
|
Group : Development/Libraries/Perl
| Source RPM : perl-Check-UnitCheck-0.13-lp156.9.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Use best of CHECK or UNITCHECK
|
Description :
Perl 5.10.0 will include the UNITCHECK block. This block runs the moment the compilation unit in which it was defined has finished compiling. Perl versions before that had only the CHECK block, which runs once global compilation has completed, which might or might not be at the same time that the compilation unit which defines it has finished.
This module allows you to define a block which will run as a UNITCHECK block in Perls that allow that, or as a CHECK block in Perls that do not. This should allow you to use UNITCHECK semantics in a CPAN module, while having a moderately graceful fallback for versions of perl that cannot support that.
Instead of writing:
CHECK { ... code ... }
or
UNITCHECK { ... code ... }
You instead say:
use Check::UnitCheck sub { ... code ... };
At the moment you can only do one sub at once (you can \'use\' the module more than once, though). In the future extra options might be provided to allow you to inject these blocks into other modules.
If you want to push a UNITCHECK block into the queue of a compilation unit that has imported you, then you can do so by calling:
Check::UnitCheck::unitcheckify(sub {...});
directly.
As code passed into the UNITCHECK or CHECK queue is marked as CvSPECIAL it is probably unwise to use references to named subroutines.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.6/x86_64 |