NAME
WordLists::Parse::Simple
SYNOPSIS
my $parser = WordLists::Parse::Simple->new;
my @senses = @{ $parser->parse_string('#*hw\tpos\tdef\nhead\tnoun\tnoggin') };
DESCRIPTION
This is a simple parser for CSV/TSV files. It doesn't do any quoted values or anything like that - the delimiter must simply never occur in the text.
The parser aims to return each row as a hashref where the keys are the column names. It needs to be given information about how to identify the header, as there is no standardised way of representing a header. (The default is to treat lines beginning #*
as headers).
If the parser is passed several rows, it will return an arrayref.
OPTIONS
On creation, a hashref may be passed with configuration options.
METHODS
parse_fh
parse_file
When the module is loaded, it checks if File::BOM can be used. If it can, then it will try to use it to guess the encoding when the user does not specify it.
parse_string
BUGS
Please use the Github issues tracker.
LICENSE
Copyright 2011-2012 © Cambridge University Press. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.