r73775 - in /branches/upstream/libxml-writer-simple-perl: ./ current/ current/lib/ current/lib/XML/ current/lib/XML/Writer/ current/t/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Apr 28 23:58:38 UTC 2011


Author: gregoa
Date: Thu Apr 28 23:58:30 2011
New Revision: 73775

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73775
Log:
[svn-inject] Installing original source of libxml-writer-simple-perl (0.05)

Added:
    branches/upstream/libxml-writer-simple-perl/
    branches/upstream/libxml-writer-simple-perl/current/
    branches/upstream/libxml-writer-simple-perl/current/Changes
    branches/upstream/libxml-writer-simple-perl/current/MANIFEST
    branches/upstream/libxml-writer-simple-perl/current/META.yml
    branches/upstream/libxml-writer-simple-perl/current/Makefile.PL
    branches/upstream/libxml-writer-simple-perl/current/README
    branches/upstream/libxml-writer-simple-perl/current/lib/
    branches/upstream/libxml-writer-simple-perl/current/lib/XML/
    branches/upstream/libxml-writer-simple-perl/current/lib/XML/Writer/
    branches/upstream/libxml-writer-simple-perl/current/lib/XML/Writer/Simple.pm
    branches/upstream/libxml-writer-simple-perl/current/t/
    branches/upstream/libxml-writer-simple-perl/current/t/00-load.t
    branches/upstream/libxml-writer-simple-perl/current/t/01-simple.t
    branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.dtd
    branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.t
    branches/upstream/libxml-writer-simple-perl/current/t/03-xml.t
    branches/upstream/libxml-writer-simple-perl/current/t/03-xml.xml
    branches/upstream/libxml-writer-simple-perl/current/t/04-power.t
    branches/upstream/libxml-writer-simple-perl/current/t/05-partial.t
    branches/upstream/libxml-writer-simple-perl/current/t/pod-coverage.t
    branches/upstream/libxml-writer-simple-perl/current/t/pod.t

Added: branches/upstream/libxml-writer-simple-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/Changes?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/Changes (added)
+++ branches/upstream/libxml-writer-simple-perl/current/Changes Thu Apr 28 23:58:30 2011
@@ -1,0 +1,22 @@
+Revision history for XML-Writer-Simple
+
+0.05    2009, 17 April
+		- Fixed bug with toxml that found a(0) to the <a/>
+		Thanks to TONNERRE for the bug report.
+
+0.04	2009, 16 February
+		- Added newlines at the end of start_tag and end_tag.
+		- Require a recent perl version (5.8.3 or higher);
+
+0.03    2009, 9 February
+		- Added support to partial tags construction.
+
+0.02    2009, 6 February
+        - About three years after the first release, here comes a new
+          one with new features. Would love to know if someone is using
+          this module.
+        - added xml_header function. Optional argument encoding => '...'
+
+0.01    2006, 30 January
+        First version with basic functionality
+

Added: branches/upstream/libxml-writer-simple-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/MANIFEST?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/MANIFEST (added)
+++ branches/upstream/libxml-writer-simple-perl/current/MANIFEST Thu Apr 28 23:58:30 2011
@@ -1,0 +1,16 @@
+Changes
+MANIFEST
+META.yml # Will be created by "make dist"
+Makefile.PL
+README
+lib/XML/Writer/Simple.pm
+t/00-load.t
+t/01-simple.t
+t/02-dtd.dtd
+t/02-dtd.t
+t/03-xml.t
+t/03-xml.xml
+t/04-power.t
+t/05-partial.t
+t/pod-coverage.t
+t/pod.t

Added: branches/upstream/libxml-writer-simple-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/META.yml?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/META.yml (added)
+++ branches/upstream/libxml-writer-simple-perl/current/META.yml Thu Apr 28 23:58:30 2011
@@ -1,0 +1,22 @@
+--- #YAML:1.0
+name:               XML-Writer-Simple
+version:            0.05
+abstract:           Create XML files easily!
+author:
+    - Alberto Simoes <ambs at cpan.org>
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Test::More:      0
+    XML::DT:         0.42
+    XML::DTDParser:  2.01
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.48
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Added: branches/upstream/libxml-writer-simple-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/Makefile.PL?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/Makefile.PL (added)
+++ branches/upstream/libxml-writer-simple-perl/current/Makefile.PL Thu Apr 28 23:58:30 2011
@@ -1,0 +1,19 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+use 5.008003;
+
+WriteMakefile(
+    NAME                => 'XML::Writer::Simple',
+    AUTHOR              => 'Alberto Simoes <ambs at cpan.org>',
+    VERSION_FROM        => 'lib/XML/Writer/Simple.pm',
+    ABSTRACT_FROM       => 'lib/XML/Writer/Simple.pm',
+    PL_FILES            => {},
+    PREREQ_PM => {
+                  'XML::DT' => 0.42,
+                  'Test::More' => 0,
+                  'XML::DTDParser' => 2.01,
+    },
+    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    clean               => { FILES => 'XML-Writer-Simple-*' },
+);

Added: branches/upstream/libxml-writer-simple-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/README?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/README (added)
+++ branches/upstream/libxml-writer-simple-perl/current/README Thu Apr 28 23:58:30 2011
@@ -1,0 +1,23 @@
+XML-Writer-Simple
+=================
+
+XML-Writer-Simple is a simple Perl module to write XML. It takes some
+ideas from CGI and applies them for the XML World.
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+    perl Makefile.PL
+    make
+    make test
+    make install
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 Alberto Simoes
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.

Added: branches/upstream/libxml-writer-simple-perl/current/lib/XML/Writer/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/lib/XML/Writer/Simple.pm?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/lib/XML/Writer/Simple.pm (added)
+++ branches/upstream/libxml-writer-simple-perl/current/lib/XML/Writer/Simple.pm Thu Apr 28 23:58:30 2011
@@ -1,0 +1,314 @@
+package XML::Writer::Simple;
+
+use warnings;
+use strict;
+use Exporter ();
+use vars qw/@ISA @EXPORT/;
+use XML::DT;
+use XML::DTDParser qw/ParseDTDFile/;
+
+=head1 NAME
+
+XML::Writer::Simple - Create XML files easily!
+
+=cut
+
+our $VERSION = '0.05';
+ at ISA = qw/Exporter/;
+ at EXPORT = (qw/powertag xml_header/);
+our %PTAGS = ();
+our $MODULENAME = "XML::Writer::Simple";
+
+=head1 SYNOPSIS
+
+    use XML::Writer::Simple dtd => "file.dtd";
+
+		print xml_header(encoding => 'iso-8859-1');
+    print para("foo",b("bar"),"zbr");
+
+=head1 USAGE
+
+This module takes some ideas from CGI to make easier the life for
+those who need to generated XML code. You can use the module in three
+flavours (or combine them):
+
+=over 4
+
+=item tags
+
+When importing the module you can specify the tags you will be using:
+
+  use XML::Writer::Simple tags => [qw/p b i tt/];
+
+  print p("Hey, ",b("you"),"! ", i("Yes ", b("you")));
+
+that will generate
+
+ <p>Hey <b>you</b>! <i>Yes <b>you</b></i></p>
+
+=item dtd
+
+You can supply a DTD, that will be analyzed, and the tags used:
+
+  use XML::Writer::Simple dtd => "tmx.dtd";
+
+  print tu(seg("foo"),seg("bar"));
+
+=item xml
+
+You can supply an XML (or a reference to a list of XML files). They
+will be parsed, and the tags used:
+
+  use XML::Writer::Simple xml => "foo.xml";
+
+  print foo("bar");
+
+=item partial
+
+You can supply an 'partial' key, to generate prototypes for partial tags
+construction. For instance:
+
+  use XML::Writer::Simple tags => qw/foo bar/, partial => 1;
+
+  print start_foo;
+  print ...
+  print end_foo;
+
+=back
+
+=head1 EXPORT
+
+This module export one function for each element at the dtd or xml
+file you are using. See below for details.
+
+=head1 FUNCTIONS
+
+=head2 import
+
+Used when you 'use' the module, should not be used directly.
+
+=head2 xml_header
+
+This function returns the xml header string, without encoding
+definition, with a trailing new line. Default XML encoding should
+be UTF-8, by the way.
+
+You can force an encoding passing it as argument:
+
+  print xml_header(encoding=>'iso-8859-1');
+
+=head2 powertag
+
+Used to specify a powertag. For instance:
+
+  powertag("ul","li");
+
+  ul_li([qw/foo bar zbr ugh/]);
+
+will generate
+
+  <ul>
+   <li>foo</li>
+   <li>bar</li>
+   <li>zbr</li>
+   <li>ugh</li>
+  </ul>
+
+You can also supply this information when loading the module, with
+
+  use XML::Writer::Simple powertags=>["ul_li","ol_li"];
+
+Powertags support three level tags as well:
+
+  use XML::Writer::Simple powertags=>["table_tr_td"];
+
+  print table_tr_td(['a','b','c'],['d','e','f']);
+
+=cut
+
+sub xml_header {
+	my %ops = @_;
+	my $encoding = "";
+	$encoding =" encoding=\"$ops{encoding}\"" if exists $ops{encoding};
+	return "<?xml version=\"1.0\"$encoding?>\n";
+}
+
+sub powertag {
+  my $nfunc = join("_", @_);
+  $PTAGS{$nfunc}=[@_];
+  push @EXPORT, $nfunc;
+  XML::Writer::Simple->export_to_level(1, $MODULENAME, $nfunc);
+}
+
+sub _xml_from {
+  my ($tag, $attrs, @body) = @_;
+  return (ref($body[0]) eq "ARRAY")?
+    join("", map{ _toxml($tag, $attrs, $_) } @{$body[0]})
+      :_toxml($tag, $attrs, join("", @body));
+}
+
+sub _clean_attrs {
+  my $attrs = shift;
+  for (keys %$attrs) {
+    if (m!^-!) {
+      $attrs->{$'}=$attrs->{$_};
+      delete($attrs->{$_});
+    }
+  }
+  return $attrs;
+}
+
+sub _toxml {
+	my ($tag,$attr,$contents) = @_;
+	if (defined($contents) && $contents ne "") {
+		return _start_tag($tag,$attr) . $contents . _close_tag($tag);		
+	}
+	else {
+		return _empty_tag($tag,$attr);
+	}
+}
+
+sub _go_down {
+  my ($tags, @values) = @_;
+  my $tag = shift @$tags;
+
+  if (@$tags) {
+    join("",
+         map {
+           my $attrs = {};
+           if (ref($_->[0]) eq 'HASH') {
+             $attrs = _clean_attrs(shift @$_);
+           }
+           _xml_from($tag,$attrs,_go_down([@$tags],@$_)) } ### REALLY NEED TO COPY
+         @values)
+  } else {
+    join("",
+         map { _xml_from($tag,{},$_) } @values)
+  }
+}
+
+sub AUTOLOAD {
+  my $attrs = {};
+  my $tag = our $AUTOLOAD;
+
+  $tag =~ s!${MODULENAME}::!!;
+
+  $attrs = shift if ref($_[0]) eq "HASH";
+  $attrs = _clean_attrs($attrs);
+
+  if (exists($PTAGS{$tag})) {
+    my @tags = @{$PTAGS{$tag}};
+    my $toptag = shift @tags;
+    return _xml_from($toptag, $attrs,
+                     _go_down(\@tags, @_));
+  }
+	else {
+		if ($tag =~ m/^end_(.*)$/) {
+			return _close_tag($1)."\n";
+		}
+		elsif ($tag =~ m/^start_(.*)$/) {
+			return _start_tag($1, $attrs)."\n";
+		}
+		else {	
+	    return _xml_from($tag,$attrs, at _);
+		}
+  }
+}
+
+sub _start_tag {
+	my ($tag,$attr) = @_;
+	$attr = join(" ",map { "$_=\"$attr->{$_}\""} keys %$attr);
+	if ($attr) {
+		return "<$tag $attr>"
+	} else {
+		return "<$tag>"
+	}
+}
+
+sub _empty_tag {
+	my ($tag,$attr) = @_;
+	$attr = join(" ",map { "$_=\"$attr->{$_}\""} keys %$attr);
+	if ($attr) {
+		return "<$tag $attr/>"
+	} else {
+		return "<$tag/>"
+	}
+}
+
+sub _close_tag {
+	my $tag = shift;
+	return "</$tag>";
+}
+
+sub import {
+  my $class = shift;
+  my %opts  = @_;
+
+	my $partial = 0;
+	$partial = 1 if exists $opts{partial};
+
+  if (exists($opts{tags})) {
+    if (ref($opts{tags}) eq "ARRAY") {
+      push @EXPORT, @{$opts{tags}};
+			if ($partial) {
+				push @EXPORT, map { "start_$_" } @{$opts{tags}};
+				push @EXPORT, map { "end_$_"   } @{$opts{tags}};
+			}
+    }
+  }
+
+  if (exists($opts{xml})) {
+    my @xmls = (ref($opts{xml}) eq "ARRAY")?@{$opts{xml}}:($opts{xml});
+    my $tags;
+    for my $xml (@xmls) {
+      dt($xml, -default => sub { $tags->{$q}++ });
+    }
+    push @EXPORT, keys %$tags;
+		if ($partial) {
+			push @EXPORT, map { "start_$_" } keys %$tags;
+			push @EXPORT, map { "end_$_"   } keys %$tags;
+		}
+  }
+
+  if (exists($opts{dtd})) {
+    my $DTD = ParseDTDFile($opts{dtd});
+    push @EXPORT, keys %$DTD;
+		if ($partial) {
+			push @EXPORT, map { "start_$_" } keys %$DTD;
+			push @EXPORT, map { "end_$_"   } keys %$DTD;
+		}
+  }
+
+  if (exists($opts{powertags})) {
+    my @ptags = @{$opts{powertags}};
+    @PTAGS{@ptags} = map { [split/_/] } @ptags;
+    push @EXPORT, @ptags;
+  }
+
+  XML::Writer::Simple->export_to_level(1, $class, @EXPORT);
+}
+
+=head1 AUTHOR
+
+Alberto Simoes, C<< <ambs at cpan.org> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-xml-writer-simple at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-Writer-Simple>.
+I will be notified, and then you'll automatically be notified of progress on
+your bug as I make changes.
+
+=head1 ACKNOWLEDGEMENTS
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2006 Alberto Simoes, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+1; # End of XML::Writer::Simple

Added: branches/upstream/libxml-writer-simple-perl/current/t/00-load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/00-load.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/00-load.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/00-load.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,8 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+	use_ok( 'XML::Writer::Simple' );
+}
+

Added: branches/upstream/libxml-writer-simple-perl/current/t/01-simple.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/01-simple.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/01-simple.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/01-simple.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,29 @@
+#!/usr/bin/perl 
+
+use Test::More tests => 11;
+use XML::Writer::Simple tags => [qw/a b c d e/];
+
+like(xml_header, qr/^<\?xml version="1\.0"\?>\n$/);
+
+like(xml_header(encoding=>'iso-8859-1'), qr/^<\?xml version="1\.0" encoding="iso-8859-1"\?>\n$/);
+
+is(a(b(c(d(e('f'))))), "<a><b><c><d><e>f</e></d></c></b></a>");
+
+is(a(b('a'),c('a')), "<a><b>a</b><c>a</c></a>");
+
+is(a(b(['a'..'h'])), "<a><b>a</b><b>b</b><b>c</b><b>d</b><b>e</b><b>f</b><b>g</b><b>h</b></a>");
+
+is(a({-foo=>'bar'}), "<a foo=\"bar\"/>");
+
+is(a({foo=>'bar'}), "<a foo=\"bar\"/>");
+
+is(a({-foo=>'bar'},'x'), "<a foo=\"bar\">x</a>");
+
+is(a({foo=>'bar'},'x'), "<a foo=\"bar\">x</a>");
+
+is(a(), "<a/>");
+
+is(a(0), "<a>0</a>");
+
+
+

Added: branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.dtd
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.dtd?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.dtd (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.dtd Thu Apr 28 23:58:30 2011
@@ -1,0 +1,3 @@
+<!ELEMENT xx (yy, zz)>
+<!ELEMENT yy (#PCDATA)>
+<!ELEMENT zz (#PCDATA)>

Added: branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/02-dtd.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,7 @@
+#!/usr/bin/perl 
+
+use Test::More tests => 2;
+use XML::Writer::Simple dtd => "t/02-dtd.dtd";
+
+is(xx(), "<xx/>");
+is(xx(yy("foo")), "<xx><yy>foo</yy></xx>");

Added: branches/upstream/libxml-writer-simple-perl/current/t/03-xml.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/03-xml.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/03-xml.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/03-xml.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,7 @@
+#!/usr/bin/perl 
+
+use Test::More tests => 2;
+use XML::Writer::Simple xml => "t/03-xml.xml";
+
+is(zbr(), "<zbr/>");
+is(foo(bar("ugh")), "<foo><bar>ugh</bar></foo>");

Added: branches/upstream/libxml-writer-simple-perl/current/t/03-xml.xml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/03-xml.xml?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/03-xml.xml (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/03-xml.xml Thu Apr 28 23:58:30 2011
@@ -1,0 +1,7 @@
+<foo>
+ <bar>
+   foo
+   <zbr/>
+   gah
+ </bar>
+</foo>

Added: branches/upstream/libxml-writer-simple-perl/current/t/04-power.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/04-power.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/04-power.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/04-power.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,33 @@
+#!/usr/bin/perl 
+
+use Test::More tests => 8;
+use XML::Writer::Simple tags => [qw/foo bar/], powertags => [qw/foo_bar table_tr_td/];
+
+is(foo(bar("ugh")), "<foo><bar>ugh</bar></foo>");
+is(foo_bar("ugh"), "<foo><bar>ugh</bar></foo>");
+is(foo_bar("a","b","c"), "<foo><bar>a</bar><bar>b</bar><bar>c</bar></foo>");
+is(foo_bar({attr=>"d"},"a","b","c"), "<foo attr=\"d\"><bar>a</bar><bar>b</bar><bar>c</bar></foo>");
+
+powertag("bar","foo");
+is(bar_foo("a","b","c"), "<bar><foo>a</foo><foo>b</foo><foo>c</foo></bar>");
+
+is(table_tr_td( ["a","b","c"],["d","e","f"] ),
+   "<table><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>d</td><td>e</td><td>f</td></tr></table>");
+
+powertag(qw/div table tr td/);
+is(div_table_tr_td({-style=>'background-color: #defdef;'},
+                   [['a','b','c'],
+                    ['d','e','f']],
+                   [['g','h','i'],
+                    ['j','k','l']]),
+   '<div style="background-color: #defdef;"><table><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>d</td><td>e</td><td>f</td></tr></table><table><tr><td>g</td><td>h</td><td>i</td></tr><tr><td>j</td><td>k</td><td>l</td></tr></table></div>');
+
+is(div_table_tr_td({-style=>'background-color: #defdef;'},
+                   [{-style=>'border: solid 1px #000000;'},
+                    ['a','b','c'],
+                    ['d','e','f']],
+                   [['g','h','i'],
+                    ['j','k','l']]),
+   '<div style="background-color: #defdef;"><table style="border: solid 1px #000000;"><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>d</td><td>e</td><td>f</td></tr></table><table><tr><td>g</td><td>h</td><td>i</td></tr><tr><td>j</td><td>k</td><td>l</td></tr></table></div>');
+
+

Added: branches/upstream/libxml-writer-simple-perl/current/t/05-partial.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/05-partial.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/05-partial.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/05-partial.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,12 @@
+#!/usr/bin/perl 
+
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+use XML::Writer::Simple partial => 1, tags => [qw/a b c d e/];
+
+
+is(start_a(),"<a>\n");
+is(start_a({foo=>'bar'}),"<a foo=\"bar\">\n");
+is(end_e(),"</e>\n");

Added: branches/upstream/libxml-writer-simple-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/pod-coverage.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/pod-coverage.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/pod-coverage.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();

Added: branches/upstream/libxml-writer-simple-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libxml-writer-simple-perl/current/t/pod.t?rev=73775&op=file
==============================================================================
--- branches/upstream/libxml-writer-simple-perl/current/t/pod.t (added)
+++ branches/upstream/libxml-writer-simple-perl/current/t/pod.t Thu Apr 28 23:58:30 2011
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();




More information about the Pkg-perl-cvs-commits mailing list