30 Sep 2012 00:04:56 UTC
- Distribution: rpm-build-perl
- Module version: 0.01
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (12)
- Testers (135 / 706 / 0)
- KwaliteeBus factor: 0
- 11.15% Coverage
- License: unknown
- Activity24 month
- Download (27.25KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionATOURBIN Alexey Tourbin
B::ConstOptree - Optree constant folding for $^O, $^V, and $]
$ perl -MO=ConstOptree -MO=Deparse} -e \ 'require ($^O eq "MSWin32" ? "Win32.pm" : "POSIX.pm")' require 'POSIX.pm'; -e syntax OK
This module propagates constant folding for $^O, $^V, and $] variables by installing custom PL_check handlers for numeric and string comparison opcodes. In the handlers, references to $^O, $^V, and $] arguments are replaced with constant terms like "linux", v5.16.1, and 5.016001, respectively.
Since regexp matching is not subject to constant folding, expressions like
$^O =~ /win32/iwill not be reduced.
Written by Alexey Tourbin <firstname.lastname@example.org>.
Copyright (c) 2012 Alexey Tourbin
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.