use abstractor; #there is no real name yet my $output = abstractor->new(); $output->load_definitions( # dirpath to definitions dir ); #or $output->add_definitions ( { a => 'print "HELLO"', b => 'print "WORLD"', c => 'print "!!"' } ) $output->compute(" "); #### $output->add_definitions ( { a => '$result = "HELLO"', b => '$result = "$data WORLD"', c => '$result = "$data!!"' } ) #$data is the string inside the tag so if you have a #tag which contains the string "HELLO", then $data #will be equal to "HELLO" when the tag is being computed print $output->compute(" "); #the interpreter ignores tags that it does not have #definitions for #### HELLO WORLD!! #### $output->add_definitions ( { a => '$result = "HELLO"' }); print $output->compute(" \n"); print $output->compute("\n"); #### $output->add_definitions ( { a => '$result = "$data"', b => '$result = "$data"', c => '$result = "HELLO WORLD!!!"' }); print $output->compute("\n"); Output : HELLO WORLD!!