forked from pool/perl-HTML-TokeParser-Simple
- updated to 3.16
Fix POD errors and move POD tests to XT directory. Fix spelling errors. OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-HTML-TokeParser-Simple?expand=0&rev=19
This commit is contained in:
committed by
Git OBS Bridge
parent
55d51a10cc
commit
5e1f956cf6
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ab006c808f4607ecdeed1d54ba997167281d97cc7d1dc968d0971f7802e72146
|
||||
size 16302
|
3
HTML-TokeParser-Simple-3.16.tar.gz
Normal file
3
HTML-TokeParser-Simple-3.16.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ed11135c6839e6e0eaf96952e6ac353a2f22ebb40a721659671e5d2dcc0e4a9d
|
||||
size 19952
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 27 11:58:44 UTC 2013 - coolo@suse.com
|
||||
|
||||
- updated to 3.16
|
||||
Fix POD errors and move POD tests to XT directory.
|
||||
Fix spelling errors.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 18 11:09:26 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-HTML-TokeParser-Simple
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,61 +15,64 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%bcond_with pod
|
||||
|
||||
Name: perl-HTML-TokeParser-Simple
|
||||
Version: 3.16
|
||||
Release: 0
|
||||
%define cpan_name HTML-TokeParser-Simple
|
||||
Summary: Easy to use HTML::TokeParser interface
|
||||
Version: 3.15
|
||||
Release: 2
|
||||
License: GPL+ or Artistic
|
||||
Summary: Easy to use C<HTML::TokeParser> interface
|
||||
License: Artistic-1.0 or GPL-1.0+
|
||||
Group: Development/Libraries/Perl
|
||||
Url: http://search.cpan.org/dist/HTML-TokeParser-Simple/
|
||||
#Source: http://search.cpan.org/CPAN/authors/id/O/OV/OVID/HTML-TokeParser-Simple-3.15.tar.gz
|
||||
Source: %{cpan_name}-%{version}.tar.gz
|
||||
Source: http://www.cpan.org/authors/id/O/OV/OVID/%{cpan_name}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{perl_requires}
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl(Module::Build)
|
||||
BuildRequires: perl-macros
|
||||
%if %{with pod}
|
||||
BuildRequires: perl(Test::Pod) >= 1.14
|
||||
BuildRequires: perl(Test::Pod::Coverage)
|
||||
%endif
|
||||
BuildRequires: perl(Test::More)
|
||||
#
|
||||
BuildRequires: perl(HTML::Parser) >= 3.25
|
||||
BuildRequires: perl(HTML::TokeParser) >= 2.24
|
||||
BuildRequires: perl(Module::Build) >= 0.40
|
||||
BuildRequires: perl(Sub::Override)
|
||||
#
|
||||
#BuildRequires: perl(HTML::Entities)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::Comment)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::Declaration)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::ProcessInstruction)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::Tag)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::Tag::End)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::Tag::Start)
|
||||
#BuildRequires: perl(HTML::TokeParser::Simple::Token::Text)
|
||||
Requires: perl(HTML::Parser) >= 3.25
|
||||
Requires: perl(HTML::TokeParser) >= 2.24
|
||||
Requires: perl(Sub::Override)
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
HTML::TokeParser::Simple is a subclass of HTML::TokeParser that uses
|
||||
easy-to-remember method calls to work with the tokens. Rather than
|
||||
try to remember a bunch of array indices or try to write a bunch of
|
||||
constants for them, you can now do something like:
|
||||
'HTML::TokeParser' is an excellent module that's often used for parsing
|
||||
HTML. However, the tokens returned are not exactly intuitive to parse:
|
||||
|
||||
$token->is_start_tag( 'form' )
|
||||
["S", $tag, $attr, $attrseq, $text]
|
||||
["E", $tag, $text]
|
||||
["T", $text, $is_data]
|
||||
["C", $text]
|
||||
["D", $text]
|
||||
["PI", $token0, $text]
|
||||
|
||||
Instead of
|
||||
To simplify this, 'HTML::TokeParser::Simple' allows the user ask more
|
||||
intuitive (read: more self-documenting) questions about the tokens
|
||||
returned.
|
||||
|
||||
$token->[0] eq 'S' and $token->[1] eq 'form'
|
||||
You can also rebuild some tags on the fly. Frequently, the attributes
|
||||
associated with start tags need to be altered, added to, or deleted. This
|
||||
functionality is built in.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Curtis "Ovid" Poe <poec@yahoo.com>
|
||||
Since this is a subclass of 'HTML::TokeParser', all 'HTML::TokeParser'
|
||||
methods are available. To truly appreciate the power of this module, please
|
||||
read the documentation for 'HTML::TokeParser' and 'HTML::Parser'.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
### rpmlint:
|
||||
# wrong-file-end-of-line-encoding
|
||||
%{__perl} -pi -e 's|\r\n|\n|' Changes README
|
||||
find . -type f -print0 | xargs -0 chmod 644
|
||||
|
||||
%build
|
||||
%{__perl} Build.PL installdirs=vendor
|
||||
@@ -79,14 +82,11 @@ Authors:
|
||||
./Build test
|
||||
|
||||
%install
|
||||
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
|
||||
./Build install destdir=%{buildroot} create_packlist=0
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,-)
|
||||
%doc Changes README
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes README xt
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user