#!perl -w use strict; use Data::Microformat::hCard::name; use Test::More tests => 8; my $simple = << 'EOF'; Pag Zipo Judiciary His High Judgmental Supremacy Learned, Impartial, and Very Relaxed EOF ok(my $name = Data::Microformat::hCard::name->parse($simple)); is($name->family_name, "Pag"); is($name->given_name, "Zipo"); is($name->additional_name, "Judiciary"); is($name->honorific_prefix, "His High Judgmental Supremacy"); is($name->honorific_suffix, "Learned, Impartial, and Very Relaxed"); my $comparison = << 'EOF';
His High Judgmental Supremacy
Zipo
Judiciary
Pag
Learned, Impartial, and Very Relaxed
EOF is($name->to_hcard, $comparison); my $text_comparison = << 'EOF'; n: honorific-prefix: His High Judgmental Supremacy given-name: Zipo additional-name: Judiciary family-name: Pag honorific-suffix: Learned, Impartial, and Very Relaxed EOF is($name->to_text, $text_comparison);