package xm::code::vars;
use strict;
BEGIN {
use Exporter;
use vars qw(@EXPORT_OK @EXPORT %EXPORT_TAGS %LANGUAGE);
use subs qw(xx);
@EXPORT = qw( %vars %LANGUAGE %ENTITIIES );
@EXPORT_OK = qw( checkTabulator);
%EXPORT_TAGS = ( FIELDS => [ @EXPORT, @EXPORT_OK ] );
}
use vars @EXPORT;
goto &Exporter::import }
return defined $_[0] ? $_[0] : ""
}
my ($line, $TABSTOP) = @_;
while ((my $at = index($line, "\t")) != -1)
{
my $cnt = ($TABSTOP - ($at % $TABSTOP));
my $replace_with = ' ' x $cnt if ($cnt);
$line =~ s/\t/$replace_with/;
};
return $line;
}
1;