From 2eaae98e2a9b34621531b61f5b2e970ed8e6f550 Mon Sep 17 00:00:00 2001 From: legatvs Date: Sat, 30 Oct 2010 16:00:52 +0300 Subject: [PATCH] cleanup Makefile.PL --- Makefile.PL | 66 +++++++++++++++++++++++-------------------------------------- 1 file changed, 25 insertions(+), 41 deletions(-) rewrite Makefile.PL (79%) mode change 100755 => 100644 diff --git a/Makefile.PL b/Makefile.PL old mode 100755 new mode 100644 dissimilarity index 79% index 9392f9f..80fed25 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,41 +1,25 @@ -#!/usr/bin/env perl - -use warnings; -use strict; - -use ExtUtils::MakeMaker; - -my $version = get_version(); - -WriteMakefile( - 'NAME' => 'umph', - ( $[ >= 5.8 ) - ? ( AUTHOR => 'Toni Gundogdu ', - 'ABSTRACT' => 'command line tool for parsing video links from Youtube feeds' - ) - : (), - 'VERSION' => $version, - 'EXE_FILES' => ['bin/umph'], - 'PREREQ_PM' => { - 'Getopt::ArgvFile' => 1.11, # tested, earlier may work - 'XML::DOM' => 1.44, # tested, earlier may work - }, - 'LICENSE' => 'gpl', - dist => { - COMPRESS => 'bzip2', - SUFFIX => '.bz2' - }, -); - -sub get_version { - my $path = 'bin/umph'; - open my $fh, "<", $path or die "$path: $!"; - foreach (<$fh>) { - close $fh and return $1 - if $_ =~ /VERSION = "(.*?)"/; - } - close $fh; - die '$path: could not find version string.'; -} - - +#!/usr/bin/env perl + +use warnings; +use strict; + +use ExtUtils::MakeMaker; + +WriteMakefile( + 'NAME' => 'umph', + VERSION_FROM => 'bin/umph', + ( $[ >= 5.8 ) + ? ( AUTHOR => 'Toni Gundogdu ', + 'ABSTRACT' => 'Command line tool for parsing video links from Youtube feeds' + ) + : (), + 'VERSION_FROM' => 'bin/umph', + 'EXE_FILES' => ['bin/umph'], + 'PREREQ_PM' => { +# Earlier versions may work. The module has been confirmed to work with: +'Getopt::ArgvFile' => 1.11, # +'XML::DOM' => 1.44, # +'version' => 0.77, # + }, + 'LICENSE' => 'gpl' +); -- 2.11.4.GIT