summaryrefslogtreecommitdiff
path: root/dev-perl/HTML-TableContentParser
diff options
context:
space:
mode:
Diffstat (limited to 'dev-perl/HTML-TableContentParser')
-rw-r--r--dev-perl/HTML-TableContentParser/HTML-TableContentParser-0.130.0.ebuild20
-rw-r--r--dev-perl/HTML-TableContentParser/Manifest1
-rw-r--r--dev-perl/HTML-TableContentParser/files/0.13-test.patch74
-rw-r--r--dev-perl/HTML-TableContentParser/metadata.xml17
4 files changed, 112 insertions, 0 deletions
diff --git a/dev-perl/HTML-TableContentParser/HTML-TableContentParser-0.130.0.ebuild b/dev-perl/HTML-TableContentParser/HTML-TableContentParser-0.130.0.ebuild
new file mode 100644
index 000000000000..642f69822aaa
--- /dev/null
+++ b/dev-perl/HTML-TableContentParser/HTML-TableContentParser-0.130.0.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MODULE_AUTHOR=SDRABBLE
+MODULE_VERSION=0.13
+inherit perl-module
+
+DESCRIPTION="Parse the content of tables in HTML"
+
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+RDEPEND="dev-perl/HTML-Parser"
+DEPEND="${RDEPEND}"
+
+SRC_TEST=do
+PATCHES=( "${FILESDIR}"/0.13-test.patch )
diff --git a/dev-perl/HTML-TableContentParser/Manifest b/dev-perl/HTML-TableContentParser/Manifest
new file mode 100644
index 000000000000..d1b42ce74726
--- /dev/null
+++ b/dev-perl/HTML-TableContentParser/Manifest
@@ -0,0 +1 @@
+DIST HTML-TableContentParser-0.13.tar.gz 4664 BLAKE2B 062dc7ac6a78ec75f7d306649710ef470c6b6f750f651cc976d9f44fa40fbf247a89e0847ed8a991cecd929f3ea328bbee69c2cb29627f6d4fb0e23d3a3ab5c5 SHA512 0707a0059a7d885052615ee7badecc8915d5f8c67fd8683a226e23a0690f1872519475c32f51f299333c3208c20ea15380624fd0ebd1dc0b11457febfb3db585
diff --git a/dev-perl/HTML-TableContentParser/files/0.13-test.patch b/dev-perl/HTML-TableContentParser/files/0.13-test.patch
new file mode 100644
index 000000000000..79916acc1e1c
--- /dev/null
+++ b/dev-perl/HTML-TableContentParser/files/0.13-test.patch
@@ -0,0 +1,74 @@
+--- t/1.t
++++ t/1.t
+@@ -2,6 +2,8 @@
+
+
+ use Test;
++use strict;
++use warnings;
+
+ BEGIN { plan tests => 34 }
+
+@@ -20,7 +22,7 @@
+
+ ## Test object creation
+
+-$obj = HTML::TableContentParser->new();
++my $obj = HTML::TableContentParser->new();
+ ok(defined $obj, 1, $@);
+
+
+@@ -29,14 +31,14 @@
+ ## the correct values to the callback.
+
+
+-$table_caption = 'This is a caption';
+-$table_content1 = 'This is table cell content 1';
+-$table_content2 = 'This is table cell content 2';
+-$table_content3 = '<a href="SomeLink">This is table cell content 3, a link</a>';
+-$table_content4 = 'Some more text wrapping <a href="SomeLink">This is table cell content 4</a> a link.';
+-$header_text = 'Header text';
++my $table_caption = 'This is a caption';
++my $table_content1 = 'This is table cell content 1';
++my $table_content2 = 'This is table cell content 2';
++my $table_content3 = '<a href="SomeLink">This is table cell content 3, a link</a>';
++my $table_content4 = 'Some more text wrapping <a href="SomeLink">This is table cell content 4</a> a link.';
++my $header_text = 'Header text';
+
+-$html = qq{
++my $html = qq{
+ <html>
+ <head>
+ </head>
+@@ -59,7 +61,7 @@
+
+
+ $HTML::TableContentParser::DEBUG = 0;
+-$tables = $obj->parse($html);
++my $tables = $obj->parse($html);
+ ok($tables->[0]->{caption}->{data}, $table_caption, $@);
+ ok($tables->[0]->{rows}->[0]->{cells}->[0]->{data}, $table_content1, $@);
+ ok($tables->[0]->{rows}->[1]->{cells}->[0]->{data}, $table_content2, $@);
+@@ -124,16 +126,17 @@
+ ok(@$tables, 2, @_);
+
+ ## and three headers for each table
+-for $t (0..$#{@$tables}) {
+- for (0..$#hdrs) {
+- ok($tables->[$t]->{headers}->[$_]->{data}, $hdrs[$_], $@);
++for my $t (0..(@$tables-1)) {
++ for (0..2) {
++ # ok($t, $t);
++ ok($tables->[$t]->{headers}->[$_]->{data}, $hdrs[$_], $@);
+ }
+ }
+
+
+ ## and three rows of three cells each, for each table.. (18 total).
+-for $t (0..$#{@$tables}) {
+- for $r (0..$#rows) {
++for my $t (0..1) {
++ for my $r (0..$#rows) {
+ for (0..2) {
+ ok($tables->[$t]->{rows}->[$r]->{cells}->[$_]->{data}, $rows[$r]->[$_], $@);
+ }
diff --git a/dev-perl/HTML-TableContentParser/metadata.xml b/dev-perl/HTML-TableContentParser/metadata.xml
new file mode 100644
index 000000000000..1adf5391cba6
--- /dev/null
+++ b/dev-perl/HTML-TableContentParser/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpan">HTML-TableContentParser</remote-id>
+ <remote-id type="cpan-module">HTML::TableContentParser</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>