Query: data::phrasebook::plain
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Data::Phrasebook::Plain(3pm) User Contributed Perl Documentation Data::Phrasebook::Plain(3pm)NAMEData::Phrasebook::Plain - The Simple Phrasebook Model.SYNOPSISuse Data::Phrasebook; my $q = Data::Phrasebook->new( class => 'Plain', loader => 'Text', file => 'phrases.txt', ); my $r = Data::Phrasebook->new( file => 'phrases.txt' ); # simple keyword to phrase mapping my $phrase = $q->fetch($keyword); # keyword to phrase mapping with parameters $q->delimiters( qr{ [% s* (w+) s* %] }x ); my $phrase = $q->fetch($keyword,{this => 'that'});DESCRIPTIONThis module is the fallback or default phrasebook class. It doesn't do much except act as a very simple templating facility.METHODSfetch Retrieves the specified "template" and substitutes any "keywords" for "values". Thus, given: hello=Hello [% where %]! And code: my $text = $q->fetch( 'hello', { where => 'world' } ); Return value is: Hello world! The delimiters are deliberately taken from Template Toolkit.SEE ALSOData::Phrasebook, Data::Phrasebook::Generic.SUPPORTPlease see the README file.AUTHOROriginal author: Iain Campbell Truskett (16.07.1979 - 29.12.2003) Maintainer: Barbie <barbie@cpan.org> since January 2004. for Miss Barbell Productions <http://www.missbarbell.co.uk>.COPYRIGHT AND LICENSECopyright (C) 2003 Iain Truskett. Copyright (C) 2004-2010 Barbie for Miss Barbell Productions. This module is free software; you can redistribute it and/or modify it under the Artistic Licence v2. perl v5.10.1 2010-08-31 Data::Phrasebook::Plain(3pm)
Similar Topics in the Unix Linux Community |
---|
Fast Data Access MMU Miss |
Run perl script on files in multiple directories |
Data validation engine |
Input for read command |
Phrase txt file row to column |