Data::Phrasebook::Plain(3pm) User Contributed Perl Documentation Data::Phrasebook::Plain(3pm)NAME
Data::Phrasebook::Plain - The Simple Phrasebook Model.
SYNOPSIS
use 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'});
DESCRIPTION
This module is the fallback or default phrasebook class. It doesn't do much except act as a very simple templating facility.
METHODS
fetch
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 ALSO
Data::Phrasebook, Data::Phrasebook::Generic.
SUPPORT
Please see the README file.
AUTHOR
Original 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 LICENSE
Copyright (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)
Check Out this Related Man Page
Data::Phrasebook::Loader(3pm) User Contributed Perl Documentation Data::Phrasebook::Loader(3pm)NAME
Data::Phrasebook::Loader - Plugin Loader module
SYNOPSIS
my $loader = Data::Phrasebook::Loader->new( class => 'Text' );
DESCRIPTION
"Data::Phrasebook::Loader" acts as an autoloader for phrasebook plugins.
CONSTRUCTOR
new
"new" takes one optional named argument: the class. It returns a new instance to the class. Any further arguments to "new" are given to the
"new" method of the appropriate class.
If no class is specified the default class of 'Text' is used.
my $loader = Data::Phrasebook::Loader->new();
OR
my $loader = Data::Phrasebook::Loader->new( class => 'Text' );
SEE ALSO
Data::Phrasebook.
Known implementations
Data::Phrasebook::Loader::Text, Data::Phrasebook::Loader::YAML, Data::Phrasebook::Loader::Ini, Data::Phrasebook::Loader::XML,
Data::Phrasebook::Loader::DBI.
SUPPORT
Please see the README file.
AUTHOR
Original 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 LICENSE
Copyright (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::Loader(3pm)
Hi Everyone,
I am trying to write a shell script that can find the longest phrase that appears at least twice in an online news article. The HTML has been parsed through an HTML parser, converted to XML and the article content extracted. I have put this article content in a text file to work... (24 Replies)
Hi,
I am quite new to shell scripting in Linux. Please help me in solving the given problem.
I have file called Data.txt
File "Data.txt" looks like
India|9990000|City
England|888800|London
Nigeria|9887766|uganda
I need to get the data after first pipe till second pipe into file... (2 Replies)
I want to create new file for 'NO 0004/01' and 'NO 0005/01' only
How can i do It for shot time
Data FILE Data.txt (Data ~1,000,000 Line)
START
NO 0001/01
HEAD AAAA
BODY1 AAA
BODY2 AAA
TAIL AAA
END
START
B1
NO 0001/02
HEAD AAAA
BODY1 AAA
BODY2 AAA
BODY3 AAA
TAIL AAA (2 Replies)
Hi
I've got phrases (string) in phrases.txt file and I've got script.sh.
How can I draw out the first line from phrases.txt, save it in variable PHRASE and perform the content of script.sh, and then draw out the second line from phrases.txt, save it in the same variable PHRASE and perform the... (4 Replies)
Hi All ,
I am unable to reinstall the OS on my Ultra Sparc 10. After the 1st CD is loaded when it goes for reboot its goes to ok prompt an its unable to boot.
What could be reason for this behavior? while loading the OS its seems fine but unable to boot!!
Then i tried changing the... (2 Replies)
Hi,
I want to run a Perl script on multiple files, with same name ("Data.txt") but in different directories (eg : 2010_06_09_A/Data.txt, 2010_06_09_B/Data.txt).
I know how to run this perl script on files in the same directory like:
for $i in *.txt
do
perl myscript.pl $i > $i.new... (8 Replies)
Hi,
I have several text files each containing some data as shown below:
File1.txt
>DataHeader
Data...
Data...
File2.txt
>DataHeader
Data...
Data...
etc.
What I want is to change the 'DataHeader' based on the file name. So the output should look like:
File1.txt
>File1
... (1 Reply)
I'm changing some html code on multiple web pages and I need to match particular phrases but keep some text within each phrase.
E.G. I need to change this line:
<DIV id="heading">Description:</DIV>
into
<span class="hlred">Description:</span><br />
The text "Description:" may... (2 Replies)
Generic Data validator
Data file:
Name,Sal,Dept
ABC,1234,D1
AYX,12356,D2
DHF,345,ED3
123,4565,FGJG
Config File:
Delimiter-","
Rule1-Name-
Rule2-Sal-
Rule3-Dept-*
Can be used to match any regex including date different format and numbers. (3 Replies)
Hello,
I want to use the read command in order to input a keyword from the keyboard.
I then want to use this keyword in a grep command.
How to I input a phrase as a keyword? For example if I use
read keyword
"today is"
and then use grep, I get "No such file or directory" error. (6 Replies)
Hi Guys,
I have one Big txt file and i what to phrase specific part as below.
Input :-
Event
Event {
recordLength 160118,
recordType 411,
eventId 3102118,
INTERNAL_PER_RO_ME_TA {
EVVXX_TIMESTAMP_HOUR 16,
EVVXX_TIMESTAMP_MINUTE 15,
EVVXX_TIMESTAMP_SECOND 3,
... (6 Replies)