Browse Source

Updated Makefile.PL to better interact with Meta::CPAN. Updated pod for clarity

Paul Trost 11 years ago
parent
commit
d61b5fac27
4 changed files with 61 additions and 31 deletions
  1. 4 0
      Changes
  2. 38 12
      Makefile.PL
  3. 4 0
      README
  4. 15 19
      lib/Disk/SMART.pm

+ 4 - 0
Changes

@@ -1,5 +1,9 @@
 Revision history for Disk-SMART
 
+0.03.1  2014-10-06
+        Updated Makefile.PL to better interact with Meta::CPAN
+        Updated pod for clarity
+
 0.03    2014-10-04
         Added Math::Round to dependency list in Makefile.PL. Credit - Syohei YOSHIDA.
         Refactored methods to return N/A first before any further proessing is done

+ 38 - 12
Makefile.PL

@@ -1,21 +1,47 @@
-use 5.006;
+use 5.010;
 use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 
 WriteMakefile(
-    NAME                => 'Disk::SMART',
-    AUTHOR              => q{Paul Trost <paul.trost@trostfamily.org>},
-    VERSION_FROM        => 'lib/Disk/SMART.pm',
-    ABSTRACT_FROM       => 'lib/Disk/SMART.pm',
-    ($ExtUtils::MakeMaker::VERSION ge 6.3002
-      ? ('LICENSE'=> 'perl')
-      : ()),
-    PL_FILES            => {},
-    PREREQ_PM => {
+    NAME             => 'Disk::SMART',
+    AUTHOR           => 'Paul Trost <ptrost@cpan.org>',
+    VERSION_FROM     => 'lib/Disk/SMART.pm',
+    MIN_PERL_VERSION => '5.010',
+    ABSTRACT_FROM    => 'lib/Disk/SMART.pm',
+    PL_FILES         => {},
+    TEST_REQUIRES    => {
         'Test::More' => 0,
+    },
+    PREREQ_PM => {
         'Math::Round' => 0,
+        'Carp'        => 0,
     },
-    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
-    clean               => { FILES => 'Disk-SMART-*' },
+    META_MERGE => {
+        'meta-spec' => { version => 2 },
+        resources   => {
+            repository => {
+                type => 'git',
+                url  => 'https://github.com/paultrost/Disk-SMART-Perl.git',
+                web  => 'https://github.com/paultrost/Disk-SMART-Perl',
+            },
+        },
+        license => ['gpl_2'],
+        dist    => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+        clean   => { FILES => 'Disk-SMART-*' },
+        prereqs => {
+            runtime => {
+                requires => {
+                    'perl'        => '5.010',
+                    'Carp'        => 0,
+                    'Math::Round' => 0,
+                }
+            },
+            test => {
+                requires => {
+                    'Test::More' => 0,
+                }
+            }
+        }
+    }
 );

+ 4 - 0
README

@@ -0,0 +1,4 @@
+Disk-SMART-Perl
+===============
+
+Perl module for interfacing with S.M.A.R.T. on a SSD or hard drive

+ 15 - 19
lib/Disk/SMART.pm

@@ -1,22 +1,12 @@
 package Disk::SMART;
-
-use warnings;
-use strict;
-use Carp;
-use Math::Round;
+{
+    $Disk::SMART::VERSION = '0.03.1'
+}
 
 =head1 NAME
 
 Disk::SMART - Provides an interface to smartctl
 
-=head1 VERSION
-
-Version 0.03
-
-=cut
-
-our $VERSION = '0.03';
-
 =head1 SYNOPSIS
 
 Disk::SMART is an object ooriented module that provides an interface to get SMART disk info from a device as well as initiate testing.
@@ -28,7 +18,13 @@ Disk::SMART is an object ooriented module that provides an interface to get SMAR
 
 =cut
 
-=head1 METHODS
+use warnings;
+use strict;
+use Carp;
+use Math::Round;
+
+
+=head1 CONSTRUCTOR
 
 =head2 B<new (DEVICE)>
 
@@ -38,6 +34,8 @@ C<DEVICE> - Device identifier of SSD / Hard Drive
 
     my $smart = Disk::SMART->new( 'dev/sda', '/dev/sdb' );
 
+Returns C<Disk::SMART> object if smartctl is available and can poll the given device.
+
 =cut
 
 sub new {
@@ -59,9 +57,7 @@ sub new {
     return $self;
 }
 
-=head1 Getting information from smartctl
-
-=cut
+=head1 USER METHODS
 
 =head2 B<get_disk_temp (DEVICE)>
 
@@ -180,11 +176,11 @@ __END__
 
 =head1 AUTHOR
 
- Paul Trost <paul.trost@trostfamily.org>
+ Paul Trost <ptrost@cpan.org>
 
 =head1 LICENSE AND COPYRIGHT
 
- Copyright 2014.
+ Copyright 2014 by Paul Trost
  This script is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2, or at your option any later version.
  <http://gnu.org/licenses/gpl.html>