Commits

Shlomi Fish committed 6615b38

Remove trailing whitespace.

  • Participants
  • Parent commits 76283b7

Comments (0)

Files changed (21)

modules/Mail-LMLM/Changes

         - Test.pm is no longer recommended.
     - Enhance the Build.PL with keywords, resources, requires and build_requires.
     - Minimal version of perl is 5.008.
+    - Add t/style-trailing-space.t and remove trailing space.
 
 0.6801    ( Fri Feb 26 13:20:42 IST 2010 )
     - Correct the Google groups' mailing list homepage.
 
 0.6500:   ( Thu Jul 23 18:04:02 IDT 2009 )
     - Added the -owner address to mailman.
-    
+
 0.6400:   ( Wed Mar  7 21:13:01 IST 2007 )
     - Kwalitee improvements:
         - Added pod.t and pod-coverage.t files.
 
     Added the RPM Spec file.
 
-0.5.15: 
-    Added a t/use.t test and made sure the objects were moved to blib 
+0.5.15:
+    Added a t/use.t test and made sure the objects were moved to blib
     during the installation.
 
     The version is now read from Mail::LMLM.pm instead of the ver.txt

modules/Mail-LMLM/MANIFEST

 Build.PL
+COPYING
 Changes
-COPYING
+INSTALL
+MANIFEST
+META.json
+META.yml                                 Module meta-data (added by MakeMaker)
+Makefile.PL
+README
+TODO
 examples/Iglu/Iglu/LMLM/Types/Hamakor.pm
 examples/Iglu/Iglu/LMLM/Types/Iglu.pm
 examples/Iglu/Iglu/LMLM/Types/Ivrix.pm
 examples/Iglu/upload.sh
 get-version.pl
 inc/Test/Run/Builder.pm
-INSTALL
+lib/Mail/LMLM.pm
 lib/Mail/LMLM/Object.pm
-lib/Mail/LMLM.pm
+lib/Mail/LMLM/Render.pm
 lib/Mail/LMLM/Render/HTML.pm
-lib/Mail/LMLM/Render.pm
 lib/Mail/LMLM/Types/Base.pm
 lib/Mail/LMLM/Types/Egroups.pm
 lib/Mail/LMLM/Types/Ezmlm.pm
 lib/Mail/LMLM/Types/Listserv.pm
 lib/Mail/LMLM/Types/Mailman.pm
 lib/Mail/LMLM/Types/Majordomo.pm
-Makefile.PL
-MANIFEST
-META.yml                                 Module meta-data (added by MakeMaker)
 perl-Mail-LMLM.spec
 perl-Mail-LMLM.spec.in
 prepare_package.sh
-README
-TODO
 t/pod-coverage.t
 t/pod.t
+t/style-trailing-space.t
 t/use.t
-META.json

modules/Mail-LMLM/examples/Iglu/Iglu/LMLM/Types/Iglu.pm

 sub get_default_homepage
 {
     my $self = shift;
-    
+
     return "http://www.iglu.org.il/";
 }
 
         return "http://www.mail-archive.com/" .
             $self->get_group_base() . '@' .
             $self->get_hostname() . "/";
-            
+
     }
 }
 

modules/Mail-LMLM/examples/Iglu/Iglu/LMLM/Types/Ivrix.pm

     {
         $self->{'owner'} = [ "nyh", "math.technion.ac.il" ];
     }
-    
+
     return 0;
 }
 
 {
     my $self = shift;
 
-    return ("http://" . 
+    return ("http://" .
         $self->get_hostname() .
         "/mailing-lists/" .
         $self->get_group_base() .

modules/Mail-LMLM/examples/Iglu/Iglu/LMLM/Types/Linuxology.pm

 sub render_something_with_subject
 {
     my $self = shift;
-    
+
     my $htmler = shift;
     my $subject = shift;
 
 sub render_subscribe
 {
     my $self = shift;
-    
+
     my $htmler = shift;
 
     return $self->render_something_with_subject($htmler, "subscribe");
 sub render_unsubscribe
 {
     my $self = shift;
-    
+
     my $htmler = shift;
 
     return $self->render_something_with_subject($htmler, "unsubscribe");
 sub render_post
 {
     my $self = shift;
-    
+
     my $htmler = shift;
 
     return $self->render_something_with_subject($htmler, "stuff");
 sub render_owner
 {
     my $self = shift;
-    
+
     my $htmler = shift;
 
     return $self->render_something_with_subject($htmler, "comments");

modules/Mail-LMLM/examples/Iglu/Iglu/LMLM/Types/Perl_IL.pm

     {
         $self->{'hostname'} = "perl.org.il";
     }
-    
+
     if (! exists($self->{'owner'}) )
     {
         $self->{'owner'} = [ "gabor", "perl.org.il" ],

modules/Mail-LMLM/examples/Iglu/test.pl

 
 my $prefix = "Iglu::LMLM::Types::";
 
-my %extra_mailing_list_classes = 
+my %extra_mailing_list_classes =
 (
     (map { $_ => $prefix . ucfirst($_) } (qw(ivrix linuxology iglu hamakor))),
     "perl-il" => $prefix . "Perl_IL",
 );
 
-my @lists = 
+my @lists =
 (
     {
         'id' => 'gnubies-il',
         'online_archive' => sub {
             my $self = shift;
             my $r = shift;
-            
+
             $r->start_para();
             $r->text("Hamakor Archive: ");
             $r->url("http://mirror.hamakor.org.il/archives/linux-il/");
             $r->end_para();
 
         },
-        'guidelines' => ("Linux-related questions and discussions. No " . 
+        'guidelines' => ("Linux-related questions and discussions. No " .
             "newbie questions (use gnubies-il instead).\n" .
             "\n" .
             "Post size is limited to 16 kilobytes. Larger posts are queued for " .
             "moderator approval.\n" .
             "\n" .
             "If you are not subscribed the message that you send to the list will " .
-            "require moderator approval and will not be sent to the members " . 
+            "require moderator approval and will not be sent to the members " .
             "automatically.\n"
             ),
     },
         'class' => 'iglu',
         'group_base' => 'iglu-jlc',
         'description' => ("The Jerusalem Linux Club's mailing list. " .
-            "Subscribe to get announcements, coordination activity " . 
+            "Subscribe to get announcements, coordination activity " .
             "and other discussions."
         ),
         'title' => "The Jerusalem Linux Club Activities",
         'class' => 'hamakor',
         'group_base' => 'telux',
         'description' => ("The Tel-Aviv Linux Club's mailing list. " .
-            "Subscribe to get announcements, coordination activity " . 
+            "Subscribe to get announcements, coordination activity " .
             "and other discussions."
         ),
         'title' => "The Tel Aviv Linux Club Discussion List",
             $self->render_none($r);
         },
     },
-    
+
     {
         'id' => 'linux-il-announce',
         'class' => 'listar',
         'group_base' => 'linux-il-announce',
         'hostname' => 'linux.org.il',
-        'description' => ("Announcements for Linux users in Israel " . 
+        'description' => ("Announcements for Linux users in Israel " .
             "(Linux-IL members are automatically subscribed)"),
         'homepage' => "http://www.iglu.org.il/",
         'title' => "Linux-IL Announce",
         'online_archive' => sub {
             my $self = shift;
             my $r = shift;
-            
+
             $r->start_para();
             $r->text("Plasma-Gate archive: ");
             $r->url("http://plasma-gate.weizmann.ac.il/Linux/maillists/");
 
         },
         'guidelines' => ("This list is moderated and the moderator accepts " .
-             "any Linux-related announcements. Note that one is " . 
+             "any Linux-related announcements. Note that one is " .
              "already subscribed to it if he is subscribed to Linux-IL"
              ),
-    },    
+    },
     {
         'id' => 'debian-il',
         'class' => 'ezmlm',
         'title' => "Debian-IL",
         'description' => ("A group dedicated for users of the Debian Linux " .
             "distribution in Israel."),
-        'guidelines' => ("Coordination of Debian activities in Israel. " . 
-            "Local Debian support and advocacy. Questions of " . 
+        'guidelines' => ("Coordination of Debian activities in Israel. " .
+            "Local Debian support and advocacy. Questions of " .
             "localization of Debian to Israel "),
         'online_archive' => "http://www.mail-archive.com/debian-il\@debian.org.il/",
     },
         'hostname' => "post.tau.ac.il",
         'title' => "Israeli BSD List",
         'group_base' => "il-bsd",
-        'description' => ("This is the Israeli mailing list for the " . 
-            "BSD-derived operating systems. Discussions regarding FreeBSD, " .            
+        'description' => ("This is the Israeli mailing list for the " .
+            "BSD-derived operating systems. Discussions regarding FreeBSD, " .
             "OpenBSD, NetBSD and BSDi are welcome"),
         'guidelines' => "None.",
-        'online_archive' => "http://post.tau.ac.il/archives/il-bsd.html",            
-    }, 
+        'online_archive' => "http://post.tau.ac.il/archives/il-bsd.html",
+    },
     {
         'id' => 'hackers-il',
         'class' => 'egroups',
         'group_base' => 'hackers-il',
         'description' => ("Hackers-IL is a mailing-list dedicated to general " .
             "discussion of computer-related topics by Israeli people."),
-        'guidelines' => ("Computers or science related discussions, " . 
+        'guidelines' => ("Computers or science related discussions, " .
             "questions, news, announcements, etc. If it's specifically " .
             "related to Linux, you should consider posting it to the " .
             "Linux-IL or gnubies-il mailing-lists instead."),
         },
         'guidelines' => ("Whatever is related to the Israeli Group of Linux " .
             "Users' web-site. Other messages should be directed to the other " .
-            "lists."),            
+            "lists."),
     },
     {
         'id' => 'perl-il',
     },
     {
         'id' => 'perl-il-news',
-        'class' => "perl-il", 
+        'class' => "perl-il",
         'title' => "Israeli Perl News & Announcements",
         'group_base' => 'news',
         'description' => ("This is a mailing list for Israeli Perl News and Announcemnts."),
         'group_base' => 'gamla-devel',
         'title' => "Gamla Development",
         'description' => sub {
-            
+
             my $self = shift;
             my $r = shift;
 
             $r->url("http://gamla.iglu.org.il/", "Gamla");
             $r->text(", the RAD and WWW application server for perl.");
             $r->end_para();
-            
+
             },
         'guidelines' => ("Whatever is related to the development and " .
             "usage of Gamla: discussions, suggestions, questions, " .
         'title' => "Ivrix Discussions List",
         'description' => ["Discussions mailing list for the Ivrix Project.",
 
-            "This is a higher-volume mailing list intended for " . 
-            "discussing ideas for Ivrix, Ivrix projects, or " . 
-            "anything related to Hebrew support for Unix. It is " . 
-            "recommended that every Ivrix member who intends to " . 
-            "actively participate in Ivrix development " . 
-            "(or follow it closely) should subscribe to this " . 
+            "This is a higher-volume mailing list intended for " .
+            "discussing ideas for Ivrix, Ivrix projects, or " .
+            "anything related to Hebrew support for Unix. It is " .
+            "recommended that every Ivrix member who intends to " .
+            "actively participate in Ivrix development " .
+            "(or follow it closely) should subscribe to this " .
             "mailing list. "
             ],
          'guidelines' => ("Whatever related to Ivrix or Hebrew support " .
 from English to Hebrew or Arabic.
 EOF
         ],
-         'guidelines' => ("Whatever related to translation of documents." . 
+         'guidelines' => ("Whatever related to translation of documents." .
             "Posts partially in Hebrew are acceptable."),
-     },     
+     },
      {
         'id' => 'haifa-linux-club-projects',
         'class' => 'ezmlm',
         'hostname' => "vipe.technion.ac.il",
         'homepage' => "http://linuxclub.il.eu.org/",
         'title' => "Haifa Linux Club's Projects Mailing-list",
-        'description' => ("The Linux Club's programming projects are discussed " . 
+        'description' => ("The Linux Club's programming projects are discussed " .
             "here.")
         ,
         'guidelines' => ("Anthing that is related to the Linux Club's Programming Projects"),
     my $main_r = shift;
 
     $main_r->para( "This is a list of the mailing-lists which are affiliated " .
-        "with the Israeli Group of Linux Users (IGLU). It includes such " . 
-        "information as how to subscribe/unsubscribe, posting address, " . 
-        "posting guidelines, the address of the mailing-list owner, the " . 
+        "with the Israeli Group of Linux Users (IGLU). It includes such " .
+        "information as how to subscribe/unsubscribe, posting address, " .
+        "posting guidelines, the address of the mailing-list owner, the " .
         "mailing-list's homepage and the online messages archive."
     );
 
     $main_r->start_para();
-    $main_r->text("If you have any comments, suggestions or additions " . 
-        "regarding the information contained here, don't hesitate to " . 
+    $main_r->text("If you have any comments, suggestions or additions " .
+        "regarding the information contained here, don't hesitate to " .
         "contact the maintainer of these pages at the following e-mail: ");
 
     $main_r->email_address("shlomif", "vipe.technion.ac.il");
     $main_r->end_para();
 }
 
-my $renderer = 
+my $renderer =
     Mail::LMLM->new(
         'extra-classes' => \%extra_mailing_list_classes,
         title => "List of Linux-related mailing-lists in Israel",

modules/Mail-LMLM/inc/Test/Run/Builder.pm

         Test::Run::CmdLine::Iface->new(
             {
                 'test_files' => $self->get_test_run_test_files(),
-            }   
+            }
             # 'backend_params' => $self->_get_backend_params(),
         );
 
 
 sub ACTION_tags
 {
-    return 
+    return
         system(qw(
             ctags -f tags --recurse --totals
     		--exclude=blib/** --exclude=t/lib/**

modules/Mail-LMLM/lib/Mail/LMLM.pm

     return $prefix . $name;
 }
 
-%mailing_list_classes = 
+%mailing_list_classes =
 (
     (
-        map { $_ => _pref(ucfirst($_)) } 
+        map { $_ => _pref(ucfirst($_)) }
         ('egroups', 'ezmlm', 'listar', 'majordomo', 'listserv', 'mailman')
     ),
     "google" => _pref("GoogleGroups"),
         $self->{'title'},
         $self->{'headline'},
         );
-        
+
     $self->{'prolog'}->($self, $main_r);
-    
+
     local(*O);
 
     foreach $mailing_list (@{$self->{'lists'}})
         $filename = $mailing_list->{'id'}.".html";
         open O, ">".$filename;
         $r = Mail::LMLM::Render::HTML->new(\*O);
-        
+
         my $class_name = $mailing_list->{'class'};
         my $class = $mailing_list_classes{$class_name} || $self->{'extra_classes'}->{$class_name} || die "Mail::LMLM: Unknown Class \"$class_name\"";
         if (ref($class) eq "CODE")
         {
             $mail_lister = $class->new(%$mailing_list);
         }
-        
-        my $title = exists($mailing_list->{'title'}) ? 
+
+        my $title = exists($mailing_list->{'title'}) ?
             $mailing_list->{'title'} :
             $mailing_list->{'id'};
 
         $r->start_document($title, $title);
-        
+
         foreach my $what (@render_what)
         {
             my $func = $what->{'func'};
             lists => \@lists,
             prolog =>  \&prolog,
             epilog => \&epilog,
-        );    
+        );
 
     $renderer->render();
 
 The Mail::LMLM module allows users to easily manage HTML directories of
 mailing lists of various mailing list managers and hosts.
 
-To use it create a new module of type Mail::LMLM with a new method, while 
-initializing it with the list of mailing lists (in order of listing), and 
+To use it create a new module of type Mail::LMLM with a new method, while
+initializing it with the list of mailing lists (in order of listing), and
 other parameters. Then, invoke the render() function to create the HTML
 files within the current directory.
 
         my $main_r = shift;
 
         $main_r->para( "This is a list of the mailing-lists which are affiliated " .
-            "with the Israeli Group of Linux Users (IGLU). It includes such " . 
-            "information as how to subscribe/unsubscribe, posting address, " . 
-            "posting guidelines, the address of the mailing-list owner, the " . 
+            "with the Israeli Group of Linux Users (IGLU). It includes such " .
+            "information as how to subscribe/unsubscribe, posting address, " .
+            "posting guidelines, the address of the mailing-list owner, the " .
             "mailing-list's homepage and the online messages archive."
         );
 
         $main_r->start_para();
-        $main_r->text("If you have any comments, suggestions or additions " . 
-            "regarding the information contained here, don't hesitate to " . 
+        $main_r->text("If you have any comments, suggestions or additions " .
+            "regarding the information contained here, don't hesitate to " .
             "contact the maintainer of these pages at the following e-mail: ");
 
         $main_r->email_address("shlomif", "vipe.technion.ac.il");
         $main_r->end_para();
 }
 
-For more information on how to interface with the renderer consult 
+For more information on how to interface with the renderer consult
 the L<HTML::LMLM::Render> reference page.
 
 =head2 extra-classes
 
-This is a reference to a hash whose keys are extra IDs for mailing lists 
+This is a reference to a hash whose keys are extra IDs for mailing lists
 classes, and its values are either the namespace of the Perl module that
 implements this class, or a subroutine that creates a new class like that.
 
 
 =head2 lists
 
-This is a reference to an array of hash references that contain the 
+This is a reference to an array of hash references that contain the
 information for the mailing lists. The fields available here are:
 
 =over 8

modules/Mail-LMLM/lib/Mail/LMLM/Object.pm

 {
     my $class = shift;
     my $self = {};
-    
+
     bless($self, $class);
-    
+
     $self->initialize(@_);
-    
+
     return $self;
 }
 
 sub destroy_
 {
     my $self = shift;
-    
+
     return 0;
 }
 
 sub DESTROY
 {
     my $self = shift;
-    
+
     $self->destroy_();
 }
 

modules/Mail-LMLM/lib/Mail/LMLM/Render.pm

     my $url = shift;
 
     my $inside;
-    
+
     if (scalar(@_))
     {
         $inside = shift;
     my $r = Mail::LMLM::Render::HTML->new(\*O);
 
     $r->start_document("My Document", "Head Title");
-    
+
     $r->start_section("Google", { 'title_url' => "http://www.google.com/", });
-    
+
     $r->para("Google is a very nice search engine.");
     $r->end_section();
     $r->end_document();
 =head2 start_section($title [, { 'title_url' => $url } ])
 
 Starts a section titled $title. The second optional paramter contains
-options. Currently the following options are available: 
+options. Currently the following options are available:
 
 =over 4
 
-=item C<'title_url'> 
+=item C<'title_url'>
 
 A URL for the section to point to.
 
 
 =head2 para($text [, $style])
 
-Outputs the text $text with style $style (refer to the text() method) 
+Outputs the text $text with style $style (refer to the text() method)
 in its own paragraph.
 
 =head1 AUTHOR

modules/Mail-LMLM/lib/Mail/LMLM/Render/HTML.pm

 sub text
 {
     my $self = shift;
-    
+
     my $text = shift;
 
     my $style;
-    
+
     if (scalar(@_))
     {
-        $style = shift;    
+        $style = shift;
     }
     else
     {
     my $title = shift;
 
     my $options;
-    
+
     if (scalar(@_))
     {
         $options = shift;
     if (exists($options->{'title_url'}))
     {
         print {*{$o}} "</a>";
-    }    
+    }
     print {*{$o}} "</h2>" ;
     print {*{$o}} "\n\n";
-    
+
 
     return 0;
 }
     my $body_title = shift;
 
     $head_title = _htmlize($head_title);
-    
+
     my $o = $self->{'out'};
 
     print {*{$o}} <<"EOF" ;
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html 
+<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
 </head>
 <body>
 EOF
-        
+
 
     print {*{$o}}("<h1>");
 
     my $r = Mail::LMLM::Render::HTML->new(\*O);
 
     $r->start_document("My Document", "Head Title");
-    
+
     $r->start_section("Google", { 'title_url' => "http://www.google.com/", });
-    
+
     $r->para("Google is a very nice search engine.");
     $r->end_section();
     $r->end_document();

modules/Mail-LMLM/lib/Mail/LMLM/Types/Base.pm

         }
         elsif ($key =~ /^-?(notes)$/)
         {
-            $self->{'notes'} = $value;            
+            $self->{'notes'} = $value;
         }
         else
         {
     {
         $self->render_none($htmler);
     }
-    
+
     return 0;
 }
 
     my $begin_msg = shift;
     my $address_method = shift;
 
-    
     $htmler->para($begin_msg);
     $htmler->indent_inc();
     $htmler->start_para();

modules/Mail-LMLM/lib/Mail/LMLM/Types/Egroups.pm

     }
     else
     {
-        return "http://" . $self->get_homepage_hostname() . 
+        return "http://" . $self->get_homepage_hostname() .
             "/group/" . $self->get_group_base() . "/";
     }
 }

modules/Mail-LMLM/lib/Mail/LMLM/Types/Ezmlm.pm

 sub _get_subscribe_address
 {
     my $self = shift;
-    
+
     return $self->group_form("subscribe");
 }
 
     my $begin_msg = shift;
     my $address_method = shift;
 
-    
+
     $htmler->para($begin_msg);
     $htmler->indent_inc();
     $htmler->start_para();
 =head2 render_post
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.
- 
+
 =head2 render_owner
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.

modules/Mail-LMLM/lib/Mail/LMLM/Types/GoogleGroups.pm

 
 
     $args = $self->SUPER::parse_args($args);
-    
+
     my (@left, $key, $value);
 
     while (scalar(@$args))

modules/Mail-LMLM/lib/Mail/LMLM/Types/Listar.pm

     my $args = shift;
 
     $args = $self->SUPER::parse_args($args);
-    
+
     return $args;
 }
 
         $self->get_request_address()
         );
     $htmler->indent_dec();
-    
-    return 0;    
+
+    return 0;
 }
 
 sub render_subscribe
 =head2 render_post
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.
- 
+
 =head2 render_owner
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.

modules/Mail-LMLM/lib/Mail/LMLM/Types/Listserv.pm

 =head2 render_post
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.
- 
+
 =head2 render_owner
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.

modules/Mail-LMLM/lib/Mail/LMLM/Types/Mailman.pm

     my $args = shift;
 
     $args = $self->SUPER::parse_args($args);
-    
+
     my (@left, $key, $value);
 
     while (scalar(@$args))
 
     return \@left;
 
-    
+
     return $args;
 }
 
     {
         return $self->{'homepage'} . "mailman/listinfo/" . $self->get_group_base(). "/";
     }
-        
+
 }
 
 sub group_form
 {
     my $self = shift;
     my $htmler = shift;
-    
+
     $htmler->start_para();
     $htmler->text("Go to ");
     $htmler->url($self->get_maintenance_url(), "to the maintenance URL");
 =head2 render_post
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.
- 
+
 =head2 render_owner
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.

modules/Mail-LMLM/lib/Mail/LMLM/Types/Majordomo.pm

     my $args = shift;
 
     $args = $self->SUPER::parse_args($args);
-    
+
     my (@left, $key, $value);
 
     while (scalar(@$args))
 =head2 render_post
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.
- 
+
 =head2 render_owner
 
 Over-rides the equivalent from L<Mail::LMLM::Types::Base>.

modules/Mail-LMLM/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;
+}
+
+my $finder = Test::TrailingSpace->new(
+    {
+        root => '.',
+        filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim))|README|Changes|LICENSE)\z/,
+    },
+);
+
+# TEST
+$finder->no_trailing_space(
+    "No trailing space was found."
+);
+