Commits

Shlomi Fish committed 4accdad

Remove trailing space.

Comments (0)

Files changed (9)

abc-path/Games-ABC_Path-Solver/Build.PL

 my $builder = Test::Run::Builder->new(
     module_name         => 'Games::ABC_Path::Solver',
     license             => 'mit',
+    dist_abstract       => 'A Solver for ABC Path',
     dist_author         => 'Shlomi Fish <shlomif@cpan.org>',
     configure_requires => {
         'Module::Build' => '0.36',

abc-path/Games-ABC_Path-Solver/Changes

             an [x,y] array ref.
 
 0.2.0   Sat Jul 23 21:22:17 IDT 2011
-        - Create lib/Games/ABC_Path/Solver/Constants.pm based on the one 
+        - Create lib/Games/ABC_Path/Solver/Constants.pm based on the one
         from Games::ABC_Path::Generator.
         - Merge common functionality into lib/Games/ABC_Path/Solver/Base.pm .
 

abc-path/Games-ABC_Path-Solver/MANIFEST

 t/results/brain-bashers.2010-12-21.abc-path-sol
 t/results/brain-bashers.2010-12-22.abc-path-sol
 t/solver-output-system-test.t
+t/style-trailing-space.t
 META.json

abc-path/Games-ABC_Path-Solver/inc/Test/Run/Builder.pm

         Test::Run::CmdLine::Iface->new(
             {
                 'test_files' => [glob("t/*.t")],
-            }   
+            }
             # 'backend_params' => $self->_get_backend_params(),
         );
 

abc-path/Games-ABC_Path-Solver/lib/Games/ABC_Path/Solver/App.pm

 =head2 new
 
 The constructor. Accepts a hash ref of named arguments. Currently only C<'argv'>
-which should point to an array ref of command-line arguments. 
+which should point to an array ref of command-line arguments.
 
 =head2 run
 

abc-path/Games-ABC_Path-Solver/lib/Games/ABC_Path/Solver/Board.pm

 {
     my ($self, $xy) = @_;
 
-    return 
+    return
     [
         grep { $self->_get_verdict($_, $xy) != $ABCP_VERDICT_NO }
         $self->_l_indexes()
             my ($xy) = @_;
 
             my $ver = $self->_get_verdict($letter, $xy);
-            if (    ($ver == $ABCP_VERDICT_YES) 
+            if (    ($ver == $ABCP_VERDICT_YES)
                 || ($ver == $ABCP_VERDICT_MAYBE))
             {
-                push @true_cells, $xy; 
+                push @true_cells, $xy;
             }
         });
 
                         }
                     )
                 );
-                push @{$self->_successful_layouts}, 
+                push @{$self->_successful_layouts},
                     @{$recurse_solver->get_successful_layouts()};
             }
         }
     push @major_diagonal_letters, $1;
 
     $self->_set_verdicts_for_letter_sets(
-        \@major_diagonal_letters, 
+        \@major_diagonal_letters,
         [map
             { Games::ABC_Path::Solver::Coord->new({x => $_, y => $_}) }
             $self->_y_indexes
     my $render_row = sub {
         my $cols = shift;
 
-        return 
+        return
             "| " .
             join(
-                " | ", 
+                " | ",
                 map { length($_) == 1 ? "  $_  " : $_ } @$cols
             ) . " |\n";
     };
         map { $render_row->($_) }
         (
         [map { sprintf("X = %d", $_+1) } $self->_x_indexes ],
-        map { my $y = $_; 
-            [ 
+        map { my $y = $_;
+            [
                 map
                 { $self->_get_possible_letters_string(Games::ABC_Path::Solver::Coord->new({x => $_, y => $y})) }
                 $self->_x_indexes
 Here is the description of their formats. The first line should be the
 magic string C<ABC Path Solver Layout Version 1:> , and the next line should
 be a row of 7 letters, the first being a hint for the top-left-to-bottom-right
-perpendicular, the last being a hint for the top-right-to-bottom-left 
-perpendicular and the rest of the letters being vertical hints. 
+perpendicular, the last being a hint for the top-right-to-bottom-left
+perpendicular and the rest of the letters being vertical hints.
 
 After that, there are 5 rows of horizontal hints being a letter, 5 spaces
 and another letter. On one of the squares one can put a letter instead of a
 
 =head2 my $board = Games::ABC_Path::Solver::Board->input_from_v1_string($layout_string)
 
-This is a class method that inputs a version 1 string (as specified in 
+This is a class method that inputs a version 1 string (as specified in
 L<input_from_file> only without the opening magic line.)
 
 =cut

abc-path/Games-ABC_Path-Solver/lib/Games/ABC_Path/Solver/Move.pm

     my ($self) = @_;
 
     return ref($self)->new(
-        { 
-            text => $self->get_text(), 
+        {
+            text => $self->get_text(),
             depth => ($self->get_depth+1),
             vars => { %{$self->{_vars}}, },
         }
 
 =head2 $self->get_var($name)
 
-This method returns the raw, unformatted value of the move's variable (or its 
+This method returns the raw, unformatted value of the move's variable (or its
 parameter) called $name. Each move class contains several parameters that can
 be accessed programatically.
 

abc-path/Games-ABC_Path-Solver/scripts/tag-release.pl

 
 use IO::All;
 
-my ($version) = 
-    (map { m{\$VERSION *= *'([^']+)'} ? ($1) : () } 
+my ($version) =
+    (map { m{\$VERSION *= *'([^']+)'} ? ($1) : () }
     io->file('lib/Games/ABC_Path/Solver.pm')->getlines()
     )
     ;

abc-path/Games-ABC_Path-Solver/t/style-trailing-space.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::TrailingSpace";
+if ($@)
+{
+   plan skip_all => "Test::TrailingSpace required for trailing space test.";
+}
+else
+{
+   plan tests => 1;
+}
+
+# TODO: add .pod, .PL, the README/Changes/TODO/etc. documents and possibly
+# some other stuff.
+my $finder = Test::TrailingSpace->new(
+   {
+       root => '.',
+       filename_regex => qr/(?:\.(?:t|pm|pl|xs|c|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z/,
+   },
+);
+
+# TEST
+$finder->no_trailing_space(
+   "No trailing space was found."
+);