package re;
$VERSION = 0.02;
my%bitmask=(taint=>0x00100000,eval=>0x00200000,);
sub setcolor{eval{require Term::Cap;
my$terminal=Tgetent Term::Cap({OSPEED=>9600});
my$props=$ENV{PERL_RE_TC}||'md,me,so,se,us,ue';
my@props=split/,/,$props;
my$colors=join"\t",map{$terminal->Tputs($_,1)}@props;
$colors=~s/\0//g;
$ENV{PERL_RE_COLORS}=$colors;};}sub bits{my$on=shift;
my$bits=0;
unless(@_){require Carp;
Carp::carp("Useless use of \"re\" pragma");}foreach my $s(@_){if($s eq 'debug' or$s eq 'debugcolor'){setcolor()if$s eq 'debugcolor';
require XSLoader;
XSLoader::load('re');
install()if$on;
uninstall()unless$on;
next;}$bits|=$bitmask{$s}||0;}$bits;}sub import{shift;
$^H|=bits(1,@_);}sub unimport{shift;
$^H&=~bits(0,@_);}1;
