Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Using YAML with Template Toolkit

by rinceWind (Monsignor)
on Jul 28, 2005 at 15:07 UTC ( #479001=snippet: print w/replies, xml ) Need Help??
Description:

YAML provides a means of storing arbitrarily complex data structures. It also permits easy human hack^Wediting.

This code snippet passes the result of loading a YAML file through a TT template, allowing you to quickly see the results.

Uses include trying out features of Template Toolkit, template debugging, quick report generation.

#!/usr/local/bin/perl

use strict;
use warnings;

use YAML qw/LoadFile/;
use Template;

my $tt = Template->new;

$tt->process($ARGV[1], LoadFile($ARGV[0])) or die $tt->error;
Replies are listed 'Best First'.
Re: Using YAML with Template Toolkit
by merlyn (Sage) on Jul 28, 2005 at 16:16 UTC
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: snippet [id://479001]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2023-02-07 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (38 votes). Check out past polls.

    Notices?