Main > Programming > Libraries >

Text::MacroScript 1.38

Text::MacroScript 1.38

Sponsored Links

Text::MacroScript 1.38 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.036 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 878
Date added: 2007-05-31
Publisher: Mark Summerfield

Text::MacroScript 1.38 description

Text::MacroScript is a macro pre-processor with embedded perl capability.

SYNOPSIS

use Text::MacroScript ;

# new() for macro processing

my $Macro = Text::MacroScript->new ;
while( <> ) {
print $Macro->expand( $_ ) if $_ ;
}

# Canonical use (the filename improves error messages):
my $Macro = Text::MacroScript->new ;
while( <> ) {
print $Macro->expand( $_, $ARGV ) if $_ ;
}

# new() for embedded macro processing

my $Macro = Text::MacroScript->new( -embedded => 1 ) ;
# Delimiters default to <: and :>
# or
my $Macro = Text::MacroScript->new( -opendelim => [[, -closedelim => ]] ) ;
while( <> ) {
print $Macro->expand_delimited( $_, $ARGV ) if $_ ;
}

# Create a macro object and create initial macros/scripts from the file(s)
# given:
my $Macro = Text::MacroScript->new(
-file => [ local.macro, ~/.macro/global.macro ]
) ;

# Create a macro object and create initial macros/scripts from the
# definition(s) given:
my $Macro = Text::MacroScript->new(
-macro => [
[ MAX_INT => 32767 ],
],
-script => [
[ DHM2S =>
[
my $s = (#0*24*60*60)+(#1*60*60)+(#2*60) ;
"#0 days, #1 hrs, #2 mins = $s secs"
],
],
-variable => [ *MARKER* => 0 ],
) ;

# We may of course use any combination of the options.

my $Macro = Text::MacroScript->new( -comment => 1 ) ; # Create the %%[] macro.

# define()

$Macro->define( -macro, $macroname, $macrobody ) ;

$Macro->define( -script, $scriptname, $scriptbody ) ;

$Macro->define( -variable, $variablename, $variablebody ) ;

# undefine()

$Macro->undefine( -macro, $macroname ) ;

$Macro->undefine( -script, $scriptname ) ;

$Macro->undefine( -variable, $variablename ) ;

# undefine_all()

$Macro->undefine( -macro ) ;

$Macro->undefine( -script ) ;

$Macro->undefine( -variable ) ;

# list()

@macros = $Macro->list( -macro ) ;
@macros = $Macro->list( -macro, -namesonly ) ;

@scripts = $Macro->list( -script ) ;
@scripts = $Macro->list( -script, -namesonly ) ;

@variables = $Macro->list( -variable ) ;
@variables = $Macro->list( -variable, -namesonly ) ;

# load_file() - always treats the contents as within delimiters if we are
# doing embedded processing.

$Macro->load_file( $filename ) ;

# expand_file() - calls expand_embedded() if we are doing embedded
# processing otherwise calls expand().

$Macro->expand_file( $filename ) ;
@expanded = $Macro->expand_file( $filename ) ;


# expand()

$expanded = $Macro->expand( $unexpanded ) ;
$expanded = $Macro->expand( $unexpanded, $filename ) ;

# expand_embedded()

$expanded = $Macro->expand_embedded( $unexpanded ) ;
$expanded = $Macro->expand_embedded( $unexpanded, $filename ) ;

This bundle also includes the macro and macrodir scripts which allows us to expand macros without having to use/understand Text::MacroScript.pm, although you will have to learn the handful of macro commands available and which are documented here and in macro. macro provides more documentation on the embedded approach.

The macroutil.pl library supplied provides some functions which you may choose to use in HTML work for example.

Text::MacroScript 1.38 Screenshot

Advertisements

Text::MacroScript 1.38 Keywords

Bookmark Text::MacroScript 1.38

Hyperlink code:
Link for forum:

Text::MacroScript 1.38 Copyright

WareSeeker periodically updates pricing and software information of Text::MacroScript 1.38 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Text::MacroScript 1.38 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Text::Macro Perl module is a template facility whos focus is on generating code such as c, java or sql. Free Download
XMacroJ is an XML macro language for building text documents from XML components. Free Download
Proc::Forking is a Perl module that provides a set of tool to fork and daemonize. Free Download
Text::LooseCSV is a highly forgiving variable length record text parser; compare to MS Excel. Free Download
HTML::Macro can process HTML templates with loops, conditionals, macros and more! Free Download
Text::Kakasi::JP is a Japanese Perl extension for Text::Kakasi. Free Download
Filter::Macro is a Perl module to make macro modules that are expanded inline. Free Download
SILVERCODERS T-Script is a scripting language which primary purpose is to generate text files. Free Download