[liblinux-distribution-perl] 04/34: import Linux::Distribution 0.10 from CPAN

gregor herrmann gregoa at debian.org
Thu Jun 4 21:35:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to annotated tag v0.22
in repository liblinux-distribution-perl.

commit 9512aeb6e6d8846f3f3492cad1f1078be42aa1c5
Author: Re Alberto <kerberus at accidia.net>
Date:   Wed Mar 9 23:44:24 2005 -0800

    import Linux::Distribution 0.10 from CPAN
    
    git-cpan-module: Linux::Distribution
    git-cpan-version: 0.10
---
 Changes                   | 15 +++++++++++++++
 META.yml                  |  2 +-
 README                    |  4 ++--
 lib/Linux/Distribution.pm | 25 ++++++++++++++-----------
 4 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/Changes b/Changes
index b65f10a..37d8700 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,19 @@
 ------------------------------------------------------------------------
+r13 | kerberus | 2005-03-10 08:37:58 +0100 (Thu, 10 Mar 2005) | 2 lines
+
+Added support for yoper, arch-linux and libranet.
+
+------------------------------------------------------------------------
+r12 | kerberus | 2005-03-09 20:04:12 +0100 (Wed, 09 Mar 2005) | 3 lines
+
+Cleaned code.
+
+
+------------------------------------------------------------------------
+r10 | kerberus | 2005-03-08 12:16:11 +0100 (Tue, 08 Mar 2005) | 1 line
+
+
+------------------------------------------------------------------------
 r9 | kerberus | 2005-03-08 12:15:48 +0100 (Tue, 08 Mar 2005) | 4 lines
 
 Version 0.03.
diff --git a/META.yml b/META.yml
index d174df9..7be72f6 100644
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Linux-Distribution
-version:      0.03
+version:      0.10
 version_from: lib/Linux/Distribution.pm
 installdirs:  site
 requires:
diff --git a/README b/README
index cb638de..91cc62c 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
-Linux-Distribution version 0.03
+Linux-Distribution version 0.10
 ===============================
 
 This is a module that guess on what kind of linux distribution we are running looking for distro's specific release file into /etc.
-It currently recognize slackware, debian, suse, fedora, redhat, turbolinux, yellowdog, knoppix, mandrake, conectiva, immunix, tinysofa, va-linux, trustix, adamantix and gentoo.
+It currently recognize slackware, debian, suse, fedora, redhat, turbolinux, yellowdog, knoppix, mandrake, conectiva, immunix, tinysofa, va-linux, trustix, adamantix, yoper, arch-linux, libranet and gentoo.
 
 INSTALLATION
 
diff --git a/lib/Linux/Distribution.pm b/lib/Linux/Distribution.pm
index fecc412..1def074 100644
--- a/lib/Linux/Distribution.pm
+++ b/lib/Linux/Distribution.pm
@@ -3,7 +3,6 @@ package Linux::Distribution;
 use 5.006000;
 use strict;
 use warnings;
-use Carp qw(carp);
 
 require Exporter;
 
@@ -11,7 +10,7 @@ our @ISA = qw(Exporter);
 
 our @EXPORT_OK = qw( distribution_name );
 
-our $VERSION = '0.03';
+our $VERSION = '0.10';
 
 our %release_files = (
     'gentoo-release'        => 'gentoo',
@@ -33,19 +32,23 @@ our %release_files = (
     'tinysofa-release'      => 'tinysofa',
     'trustix-release'       => 'trustix',
     'adamantix_version'     => 'adamantix',
+    'yoper-release'         => 'yoper',
+    'arch-release'          => 'arch',
+    'libranet_version'      => 'libranet',
     'va-release'            => 'va-linux'
 );
 
-carp('you are trying to use a linux specific module on a different OS')
-  if ( $^O ne 'linux' );
 
-sub distribution_name() {
-    foreach my $test ( keys %release_files ) {
-        if ( -f "/etc/$test" ) {
-            return $release_files{$test};
-        }
+if ($^O ne 'linux') {
+	require Carp;
+	Carp::croak 'you are trying to use a linux specific module on a different OS';
+}
+
+sub distribution_name {
+    foreach (keys %release_files) {
+        return $release_files{$_} if -f "/etc/$_"
     }
-    return '';
+    undef 
 }
 
 1;
@@ -70,7 +73,7 @@ Linux::Distribution - Perl extension to guess on what linux distribution we are
 
 This is a simple module that try to guess on what linux distribution we are running looking for release's files in /etc.
 
-It currently recognize slackware, debian, suse, fedora, redhat, turbolinux, yellowdog, knoppix, mandrake, conectiva, immunix, tinysofa, va-linux, trustix, adamantix and gentoo.
+It currently recognize slackware, debian, suse, fedora, redhat, turbolinux, yellowdog, knoppix, mandrake, conectiva, immunix, tinysofa, va-linux, trustix, adamantix, yoper, arch-linux, libranet and gentoo.
 
 =head2 EXPORT
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/liblinux-distribution-perl.git



More information about the Pkg-perl-cvs-commits mailing list