Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 9d9b5ad10ada8d49a2be0b972af66f63 > files > 2

perl-Text-Tags-0.02-1mdk.src.rpm

%define realname   Text-Tags

Name:		perl-%{realname}
Version:    0.02
Release:    %mkrel 1
License:	GPL or Artistic
Group:		Development/Perl
Summary:    Perl module to parse "folksonomy" space-separated tags
Source0:    http://search.cpan.org/CPAN/authors/id/G/GL/GLASSER/%{realname}-%{version}.tar.bz2
Url:		http://search.cpan.org/dist/%{realname}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:	perl-devel
BuildArch:      noarch

%description
Parses "folksonomies", which are 
simple space-or-comma-separated-but-optionally-quoted tag lists.

Specifically, tags can be any string, as long as they don't contain both a 
single and a double quote. Hopefully, this is a pretty obscure restriction. 
In addition, all whitespace inside tags is normalized to a single space 
(with no leading or trailing whitespace).

In a tag list string, tags can optionally be quoted with either single or 
double quotes. There is no escaping of either kind of quote, although you 
can include one type of quote inside a string quoted with the other. Quotes 
can also just be included inside tags, as long as they aren't at the 
beginning; thus a tag like joe's can just be entered without any extra quoting. 
Tags are separated by whitespace and/or commas, though quoted tags can run into 
each other without whitespace. Empty tags (put in explicitly with "" or '') are
ignored. (Note that commas are not normalized with whitespace, and can be 
included in a tag if you quote them.)

Why did the previous paragraph need to be so detailed? Because 
Text::Tags::Parser always successfully parses every line. That is, every single 
tags line converts into a list of tags, without any error conditions. For 
general use, you can just understand the rules as being separate tags with 
spaces or commas, and put either kind of quotes around tags that need to have 
spaces.


%prep
%setup -q -n %{realname}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%make

%check
make test

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc Changes  README
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Wed Sep 21 2005 Michael Scherer <misc@mandriva.org> 0.02-1mdk
- First mandriva package