GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  B::CONSTOPTREE (3)

.ds Aq ’

NAME

B::ConstOptree - Optree constant folding for $^O, $^V, and $]

CONTENTS

SYNOPSIS



 $ perl -MO=ConstOptree -MO=Deparse} -e \
        require ($^O eq "MSWin32" ? "Win32.pm" : "POSIX.pm")
 require POSIX.pm;
 -e syntax OK



DESCRIPTION

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.

CAVEATS

Since regexp matching is not subject to constant folding, expressions like $^O =~ /win32/i will not be reduced.

AUTHOR

Written by Alexey Tourbin <at@altlinux.org>.

COPYING

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CONSTOPTREE (3) 2012-09-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.