AtomicSoft.com Add power to your website!
Home Products Services Support Free
EasyData/SQL
easy-to-use web interface for SQL databases with countless features
AtomicDesk
help desk, FAQ, knowledge base, live support chat - all in one product
Custom programming
Installation
Documentation
HelpDesk
Libraries
Join our newsletter for information on software updates and new releases. You may unsubscribe at any time.



Click here to download plain text source code.

# subroutine name: macro_process
# Input: string
# If input string starts with "&", all the rest text
# is considered as perl script to be executed, and
# subroutine returns result of script work.
# Otherwise returns passed input string unchanged.
# Usage example: macro_process("Plain text");
#        Result: "Plain text"
# Usage example: macro_process("& 2+2");
#        Result: "4"
sub    macro_process {
    my ($templatetext) = @_;
    if ($templatetext=~m/^&(.+)/s) {
        evaluate($1);
    } else {
        $templatetext;
    };
}
 
Copyright © 1999-2007 Atomicsoft Ltd. All Rights Reserved.