Text-FrontMatter-YAML

 view release on metacpan or  search on metacpan

lib/Text/FrontMatter/YAML.pm  view on Meta::CPAN

new() creates a new Text::FrontMatter::YAML object. You can pass either
C<document_string> with the full text of a document (see L<The Structure
of files with front matter>) or one or both of C<frontmatter_hashref>
and C<data_text>.

=cut

sub new {
    my $class = shift;
    my $self  = {};
    bless $self => $class;

    my %args = @_;

    # make sure we get something to init with
    unless (
        exists $args{'document_string'}
        || exists $args{'frontmatter_hashref'}
        || exists $args{'data_text'}
    )
    {



( run in 0.514 second using v1.01-cache-2.11-cpan-65fba6d93b7 )