Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use perl5i

  • Loading branch information...
commit 15178b8fe3b7e95370552199d7bc1b2d0f24541a 1 parent 9757698
@doherty authored
Showing with 9 additions and 22 deletions.
  1. +3 −2 Makefile.PL
  2. +2 −5 bin/perlhl
  3. +4 −15 lib/App/perlhl.pm
View
5 Makefile.PL
@@ -2,7 +2,7 @@
use strict;
use warnings;
-BEGIN { require 5.010100; }
+BEGIN { require 5.006; }
use ExtUtils::MakeMaker 6.31;
@@ -33,7 +33,8 @@ my %WriteMakefileArgs = (
'Pod::Usage' => '0',
'Syntax::Highlight::Perl::Improved' => '1.01',
'Term::ANSIColor' => '3.00',
- 'autodie' => '0'
+ 'autodie' => '0',
+ 'perl5i::2' => '0'
},
'VERSION' => '0.002',
'test' => {
View
7 bin/perlhl
@@ -1,11 +1,8 @@
#!perl
-use strict;
-use warnings;
-use 5.010100;
-
package perlhl;
# ABSTRACT: command-line syntax highlighter for Perl source code
-
+# VERSION
+use perl5i::2;
require App::perlhl;
use Getopt::Long;
use Pod::Usage;
View
19 lib/App/perlhl.pm
@@ -1,11 +1,7 @@
package App::perlhl;
# ABSTRACT: application class for syntax highlighting Perl source code
-use strict;
-use warnings;
-use 5.010100;
-#VERSION
-use autodie qw(open close);
-use Carp ();
+# VERSION
+use perl5i::2;
use Syntax::Highlight::Perl::Improved 1.01 ();
use Term::ANSIColor 3.00 ();
@@ -40,10 +36,7 @@ break -- well it works on mine, so neener neener).
=cut
-sub new {
- my $class = shift;
- my $opts = shift;
-
+method new($class: $opts) {
my $formatter = Syntax::Highlight::Perl::Improved->new();
if ($opts->{html}) {
my $color_table = {
@@ -131,11 +124,7 @@ If present, the application will print version data and exit.
=cut
-sub run {
- my $self = shift;
- my $opts = shift;
- my $argv = shift;
-
+method run($opts, $argv) {
if ($opts->{version}) {
require File::Basename;
my $this = File::Basename::basename($0); # __PACKAGE__?
Please sign in to comment.
Something went wrong with that request. Please try again.