debian/0000755000000000000000000000000012126305324007164 5ustar debian/rules0000755000000000000000000000043512126305324010246 0ustar #!/usr/bin/make -f PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) %: dh $@ override_dh_installexamples: dh_installexamples find $(TMP)/usr/share/doc/$(PACKAGE)/examples -type f -print0 | \ xargs -r0 sed -i -e '1s|^#!.*/perl[0-9\.]*|#!/usr/bin/perl|' debian/control0000644000000000000000000000202112126305324010562 0ustar Source: libregexp-assemble-perl Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl Maintainer: Debian Perl Group Uploaders: Xavier Guimard Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libregexp-assemble-perl.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libregexp-assemble-perl.git Homepage: https://metacpan.org/release/Regexp-Assemble/ Package: libregexp-assemble-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends} Description: Perl module that assemble multiple regexps into a single one Regexp::Assemble takes an arbitrary number of regular expressions and assembles them into a single regular expression (or RE) that matches all that the individual REs match. . It is also possible to track the original patterns, so that you can determine which, among the source patterns that form the assembled pattern, was the one that caused the match to occur. debian/source/0000755000000000000000000000000012126305324010464 5ustar debian/source/format0000644000000000000000000000001412126305324011672 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000766312126305324011052 0ustar libregexp-assemble-perl (0.35-8) unstable; urgency=low [ gregor herrmann ] * debian/watch: update to ignore development releases. [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git://anonscm.debian.org) * Change search.cpan.org based URIs to metacpan.org based URIs [ Xavier Guimard ] * Correct upstream license which is "Artistic or GPL-1+" and not "Artistic or GPL-2" * Bump Standards-Version to 3.9.4 * Remove DMUA flag * Clean and join previous patches: + add spelling errors patch + add regexp-assemble in exe_files with a patch (better than an override to generate manpage) + add an override in debian/rules to correct interpreter path * Add eg/* into examples * Update short description -- Xavier Guimard Mon, 01 Apr 2013 13:40:20 +0200 libregexp-assemble-perl (0.35-7) unstable; urgency=low * Change description into a noun phrase * Little errors in copyright (not Format 1.0) -- Xavier Guimard Sat, 30 Jun 2012 17:19:08 +0200 libregexp-assemble-perl (0.35-6) unstable; urgency=low * Join Debian Perl project * convert to Copyright Format 1.0 * add Vcs-* fields -- Xavier Guimard Sat, 09 Jun 2012 09:19:07 +0200 libregexp-assemble-perl (0.35-5) unstable; urgency=low * Change pb introduced by 0.35-4 - missing-field-in-dep5-copyright - obsolete-field-in-dep5-copyright * format-specification format * upstream-maintainer upstream-contact - unused-license-paragraph-in-dep5-copyright * Verified using 'lintian --keep-lab -L "+>=minor/possible"' -- Xavier Guimard Fri, 30 Mar 2012 07:01:20 +0200 libregexp-assemble-perl (0.35-4) unstable; urgency=low * Change few things reported by Lintian : - bad interpreter in track example - bad url in copyright format (introduced in 0.35-3) -- Xavier Guimard Mon, 26 Mar 2012 20:23:04 +0200 libregexp-assemble-perl (0.35-3) unstable; urgency=low * Update Standards-Version to 3.9.3 * Use new copyright format -- Xavier Guimard Sat, 24 Mar 2012 18:25:09 +0100 libregexp-assemble-perl (0.35-2) unstable; urgency=low * Add build-arch target * Standards-Version to 3.9.2 -- Xavier Guimard Sat, 15 Oct 2011 09:30:38 +0200 libregexp-assemble-perl (0.35-1) unstable; urgency=low * New upstream release * Should close problems to run it with Perl 5.14 (Closes: #629285) -- Xavier Guimard Sun, 18 Sep 2011 14:29:32 +0200 libregexp-assemble-perl (0.34-6) unstable; urgency=low * Update package description (Closes: #612719) * Change name of assemble script to regexp-assemble (Closes: #603812) -- Xavier Guimard Sat, 26 Mar 2011 10:24:40 +0100 libregexp-assemble-perl (0.34-5) unstable; urgency=low * Install assemble in /usr/bin (Closes: #598712) * Uploaded with old gpg key -- Xavier Guimard Sat, 02 Oct 2010 13:17:50 +0200 libregexp-assemble-perl (0.34-4) unstable; urgency=low * Install assemble in /usr/bin (Closes: #598712) * New gpg key refused, aborted -- Xavier Guimard Sat, 02 Oct 2010 13:12:34 +0200 libregexp-assemble-perl (0.34-3) unstable; urgency=low * syntax error in extended description (Closes: #584774) -- Xavier Guimard Tue, 08 Jun 2010 10:59:49 +0200 libregexp-assemble-perl (0.34-2) unstable; urgency=low * Invalid origine file * Fix documentation includes dh-make-perl boilerplate in long description (Closes: #507471) -- Xavier Guimard Thu, 11 Dec 2008 16:03:58 +0100 libregexp-assemble-perl (0.34-1) unstable; urgency=low * New upstream release -- Xavier Guimard Tue, 24 Jun 2008 15:54:03 +0200 libregexp-assemble-perl (0.32-1) unstable; urgency=low * Initial Release (Closes: #469186) -- Xavier Guimard Mon, 03 Mar 2008 14:49:11 +0100 debian/compat0000644000000000000000000000000212126305324010362 0ustar 8 debian/patches/0000755000000000000000000000000012126305324010613 5ustar debian/patches/spelling-errors.patch0000644000000000000000000000216712126305324014771 0ustar Description: Spelling errors Author: Xavier Guimard Bug: https://rt.cpan.org/Ticket/Display.html?id=84336 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=84336 Last-Update: 2013-04-01 --- a/Assemble.pm +++ b/Assemble.pm @@ -49,7 +49,7 @@ trie. Note that Perl's own regular expression engine will implement trie optimisations in perl 5.10 (they are already available in perl 5.9.3 if you want to try them out). C will -do the right thing when it knows it's running on a a trie'd perl. +do the right thing when it knows it's running on a trie'd perl. (At least in some version after this one). Some more examples of usage appear in the accompanying README. If @@ -3211,7 +3211,7 @@ =item Regexp::Trie Funnily enough, this was my working name for C -during its developement. I changed the name because I thought it +during its development. I changed the name because I thought it was too obscure. Anyway, C does much the same as C and C except that it runs much faster (according to the author). It does not recognise debian/patches/series0000644000000000000000000000006412126305324012030 0ustar spelling-errors.patch install-regexp-assemble.patch debian/patches/install-regexp-assemble.patch0000644000000000000000000000065712126305324016373 0ustar Description: install regexp-assemble file Author: Xavier Guimard Forwarded: not-needed Last-Update: 2013-04-01 --- a/Makefile.PL +++ b/Makefile.PL @@ -10,7 +10,7 @@ print "Adding testcover target\n"; } -my $file = []; +my $file = ['debian/regexp-assemble']; #if( my $response = prompt( 'Install eg/assemble as a program (y/N)', 'n' )) { # push @$file, "eg/assemble" if $response =~ /^\s*y/im, #} debian/copyright0000644000000000000000000000266412126305324011127 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Regexp::Assemble Upstream-Contact: David Landgren Source: https://metacpan.org/release/Regexp-Assemble/ Files: debian/* Copyright: 2008, 2010, 2011, 2012, Xavier Guimard License: GPL-2 Files: * Copyright: 2004, 2005, 2006, 2007, 2008, 2011, David Landgren License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; under version 2 of the License. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/libregexp-assemble-perl.examples0000644000000000000000000000000512126305324015431 0ustar eg/* debian/regexp-assemble0000755000000000000000000001165712126305324012207 0ustar #! /usr/bin/perl -w # # regexp-assemble - read lines from STDIN and assemble them into a pattern # # Copyright (C) David Landgren 2004-2008 use strict; use Getopt::Std; use Regexp::Assemble; use Time::HiRes 'time'; use vars '$VERSION'; $VERSION = '0.92'; getopts( 'abcd:f:i:nprsSt:TuUvw', \my %opt ); print "$VERSION\n" and exit if $opt{v}; $opt{d} |= 8 if $opt{T}; my $ra = Regexp::Assemble->new( chomp => 1, debug => $opt{d} || 0, fold_meta_pairs => exists $opt{f} ? 0 : 1, reduce => exists $opt{r} ? 0 : 1, dup_warn => exists $opt{u} ? 1 : 0, lookahead => exists $opt{a} ? 1 : 0, unroll_plus => exists $opt{U} ? 1 : 0, ); if( $opt{b} or $opt{c} ) { if( !$opt{b} ) { # filter comments $ra->pre_filter( sub { $_[0] =~ s/\s*#.*$//; 1 } ); } elsif( !$opt{c} ) { # filter blank lines $ra->pre_filter( sub { length(shift) } ); } else { # filter comments and blank lines. # (removing a comment may can cause a line to become blank $ra->pre_filter( sub { $_[0] =~ s/\s*#.*$//; length($_[0]) } ); } } $ra->add( <> ); # need to tickle reduction explicitly in the event of -S and -d8 $ra->_reduce() if $opt{S} and $opt{d} and ($opt{d} & 8); if( $opt{i} or $opt{p} or not ($opt{t} or $opt{S}) ) { print $ra->as_string( indent => $opt{i} || 0 ); print "\n" unless $opt{n}; } if( $opt{s} or $opt{S} ) { warn qq{# nr=@{[$ra->stats_add]} dup=@{[$ra->stats_dup]} raw=@{[$ra->stats_raw]} cooked=@{[$ra->stats_cooked]} len=@{[$ra->stats_length]}\n}; } if( $opt{t} ) { my $error = 0; my $file = $opt{t}; open IN, $file or die "Cannot open $file for input: $!\n"; print $ra->as_string, "\n"; while( ) { chomp; if( $opt{w} ) { next if $_ =~ /^$ra$/; } else { next if $_ =~ /$ra/; } print "FAIL <$_>\n"; ++$error; } close IN; exit $error ? 1 : 0; } =head1 NAME regexp-assemble - Assemble a list of regular expressions from a file =head1 SYNOPSIS regexp-assemble -abcdfinprsStTuUvw file [...] =head1 DESCRIPTION Assemble a list of regular expression either from standard input or a file, using the Regexp::Assemble module. =head1 OPTIONS =over 5 =item B<-a> look Ahead. Insert C<(?=...)> zero-width lookahead assertions in the pattern, where necessary. =item B<-b> Blank. Ignore blank lines. =item B<-c> Comment. Basic comment filtering. Strip off perl/shell comments (C<\s*#.*$/>). =item B<-d> Debug. Turns on debugging output. See L for suitable values. =item B<-i> Indent. Print the regular expression using and indent of n to display nesting. A.k.a pretty-printing. Implies -p. =item B<-n> No newline. Do not print a newline after the pattern. Useful when interpolating the output into a templating system or similar. =item B<-p> Print. Print the pattern. This is the default, however, it is required when the -t switch is enabled (because if you want to test patterns ordinarily you don't care what the the assembled pattern looks like). =item B<-r> Reduce. The default behaviour is to reduce the assembled pattern. Enabling this switch causes the reduction algorithm to be switched off. This can help you determine how much reduction is performed. regexp-assemble pattern.file | wc # versus regexp-assemble -r pattern.file | wc =item B<-s> Statistics. Print some statistics about the assembled pattern. The output is sent to STDERR (in order to allow the generated pattern to be redirected elsewhere). =item B<-S> Statistics only. Like B<-s>, except that the pattern itself is not output. Useful with B<-d 8> to see the time taken. =item B<-t> Test. Test the assembled expression against the contents of a file. Each line is read from the file and is matched against the pattern. Lines that fail to match are printed. In other words, no output is good output. In this mode of operation, error status is 1 in the case of a failure, 0 if all lines matched. =item B<-T> Time. Print statistics on the time taken to reduce and assemble the pattern. (This is merely a lazy person's synonym for C<-d 8>). =item B<-u> Unique. Carp if duplicate patterns are found. =item B<-U> Unroll. Transform C I into C (which may allow additional reductions). =item B<-v> Version. Print the version of the regexp-assemble script. =item B<-w> Word/Whole. When testing the contents of a file with C<-t>, bracket the expression with C<^> and C<$> in order to match the whole word or line from the file. =back =head1 DIAGNOSTICS Will print out a summary of the problem if an added pattern causes the assembly to fail. =head1 SEE ALSO L =head1 AUTHOR Copyright (C) 2004-2008 David Landgren. All rights reserved. =head1 LICENSE This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. debian/watch0000644000000000000000000000036312126305324010217 0ustar # format version number, currently 3; this line is compulsory! version=3 # URL to the package page followed by a regex to search https://metacpan.org/release/Regexp-Assemble/ .*/Regexp-Assemble-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$