Commits

Shlomi Fish committed 03c05b7

Move bump-ver-number.

  • Participants
  • Parent commits bdffda4

Comments (0)

Files changed (3)

File-Dir-Dumper/MANIFEST

 Build.PL
-bump-version-number.pl
 Changes
 inc/Test/Run/Builder.pm
 lib/File/Dir/Dumper/App.pm
 MANIFEST
 META.yml
 README
+scripts/bump-version-number.pl
 scripts/dir-dump
 t/00-load.t
 t/boilerplate.t
 t/sample-data/placeholder.txt
 t/script.t
 t/test-stream.t
+META.json

File-Dir-Dumper/bump-version-number.pl

-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use File::Find::Object;
-use IO::All;
-
-my $tree = File::Find::Object->new({}, 'lib/');
-
-my $new_version = "0.0.7";
-my $version_re = qr{\d+\.\d+\.\d+};
-
-while (my $r = $tree->next()) {
-    if ($r =~ m{/\.svn\z})
-    {
-        $tree->prune();
-    }
-    elsif ($r =~ m{\.pm\z})
-    {
-        my @lines = io->file($r)->getlines();
-        LINES_LOOP:
-        foreach (@lines)
-        {
-            s#(\$VERSION = ')$version_re(')#$1 . $new_version . $2#e;
-            s#\A(Version )$version_re(\s*\n?\z)#$1 . $new_version . $2#e;
-        }
-        io->file($r)->print(
-            @lines
-        );
-    }
-}
-

File-Dir-Dumper/scripts/bump-version-number.pl

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use File::Find::Object;
+use IO::All;
+
+my $tree = File::Find::Object->new({}, 'lib/');
+
+my $new_version = "0.0.7";
+my $version_re = qr{\d+\.\d+\.\d+};
+
+while (my $r = $tree->next()) {
+    if ($r =~ m{/\.svn\z})
+    {
+        $tree->prune();
+    }
+    elsif ($r =~ m{\.pm\z})
+    {
+        my @lines = io->file($r)->getlines();
+        LINES_LOOP:
+        foreach (@lines)
+        {
+            s#(\$VERSION = ')$version_re(')#$1 . $new_version . $2#e;
+            s#\A(Version )$version_re(\s*\n?\z)#$1 . $new_version . $2#e;
+        }
+        io->file($r)->print(
+            @lines
+        );
+    }
+}
+