Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

droped perl 5.14 dependency by refactoring out /r modifier

  • Loading branch information...
commit 18fb5401d719a5f78c735b8995eb2f230fe213cc 1 parent ebd91c0
André Santos authored

Showing 2 changed files with 13 additions and 11 deletions. Show diff stats Hide diff stats

  1. +2 2 dist.ini
  2. +11 9 lib/App/TeXMine.pm
4 dist.ini
@@ -9,8 +9,8 @@ main_module = bin/texmine
9 9 [@Filter / Basic]
10 10 -bundle = @Basic
11 11 -remove = Readme
12   --remove = UploadToCPAN
13   -[FakeRelease]
  12 +;-remove = UploadToCPAN
  13 +;[FakeRelease]
14 14
15 15 [Git::NextVersion]
16 16 first_version = 0.01_01
20 lib/App/TeXMine.pm
... ... @@ -1,8 +1,5 @@
1   -
2   -use 5.014;
3   -use strict;
  1 +use strict; use warnings;
4 2 package App::TeXMine;
5   -use warnings;
6 3 use feature 'say';
7 4
8 5 # ABSTRACT: extract information from LaTeX files
@@ -45,7 +42,8 @@ sub img {
45 42 last if $line =~ m|\\end{document}| and ! $options->{a};
46 43 if ($line =~ /$imgpat/p) {
47 44 my $comm = ${^MATCH};
48   - my $img = $comm =~ s/^.*?{(.*?)}/$1/r;
  45 + my $img = $comm;
  46 + $img =~ s/^.*?{(.*?)}/$1/;
49 47 push @$res,$img if $img;
50 48 }
51 49 }
@@ -77,7 +75,8 @@ sub url{
77 75 last if $line =~ m|\\end{document}| and ! $options->{a};
78 76 if ($line =~ /$urlpat/p) {
79 77 my $comm = ${^MATCH};
80   - my $url = $comm =~ s/^.*?{(.*?)}/$1/r;
  78 + my $url = $comm;
  79 + $url =~ s/^.*?{(.*?)}/$1/;
81 80 say $url;
82 81 push @$res,$url if $url;
83 82 }
@@ -109,7 +108,8 @@ sub bib {
109 108 last if $line =~ m|\\end{document}| and ! $options->{a};
110 109 if ($line =~ /$citepat/p) {
111 110 my $comm = ${^MATCH};
112   - my $cite = $comm =~ s/^.*?{(.*?)}/$1/r;
  111 + my $cite = $comm;
  112 + $cite =~ s/^.*?{(.*?)}/$1/;
113 113 say foreach split /,/,$cite ;
114 114 push @$res,$cite if $cite;
115 115 }
@@ -142,12 +142,14 @@ sub index {
142 142 last if $line =~ m|\\end{document}| and ! $options->{a};
143 143 if ($line =~ /$chpat/p) {
144 144 my $comm = ${^MATCH};
145   - my $chap = $comm =~ s/^.*?{(.*?)}/$1/r;
  145 + my $chap = $comm;
  146 + $chap =~ s/^.*?{(.*?)}/$1/;
146 147 $res.="$chap\n";
147 148 }
148 149 if ($line =~ /$secpat/p){
149 150 my $comm = ${^MATCH};
150   - my $sec = $comm =~ s/^.*?{(.*?)}/$1/r;
  151 + my $sec = $comm;
  152 + $sec =~ s/^.*?{(.*?)}/$1/;
151 153 my $tabs = 0;
152 154
153 155 $tabs++ while ($comm =~ s/sub//g);

0 comments on commit 18fb540

Please sign in to comment.
Something went wrong with that request. Please try again.