File: meta.t

package info (click to toggle)
libpod-pom-perl 2.01-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 800 kB
  • sloc: perl: 2,756; makefile: 7
file content (49 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/perl -w                                         # -*- perl -*-

use strict;
use lib qw( ./lib ../lib );
use Pod::POM qw( meta );
use Pod::POM::Nodes;
use Pod::POM::Test;

#$Pod::POM::Node::DEBUG = 1;
my $DEBUG = 1;


ntests(6);

my $parser = Pod::POM->new( warn => 1 );
my $pom = $parser->parse_file(\*DATA);
assert( $pom );

my @w = $parser->warnings();
if (@w) {
    print STDERR scalar @w, " warnings\n";
    foreach my $w (@w) {
	print STDERR "warning: $w\n";
    }
}
else {
    ok(1);
    # print "Syntax OK, no warnings\n";
}


match( $pom->meta('module'), 'Foo::Bar::Baz' );
match( $pom->meta('author'), 'Andy Wardley' );

my $meta = $pom->meta();
match( $meta->{ module }, 'Foo::Bar::Baz' );
match( $meta->{ author }, 'Andy Wardley' );


__DATA__
=meta module Foo::Bar::Baz

=meta author Andy Wardley

=head1 NAME

A test Pod document.

Another paragraph with a B<bold> tag.