burak / CPAN-Sys-Info

Fetch information from the host system (Perl)

Clone this repository (size: 40.6 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/burak/cpan-sys-info/

Changed (Δ55 bytes):

raw changeset »

SPEC (32 lines added, 32 lines removed)

TODO (23 lines added, 23 lines removed)

Up to file-list SPEC:

1
use strict;
2
# copy-paste from Sys::Info::Constants
3
BEGIN {
4
    if ( ! defined &OSID ) {
5
        my %OS = (
6
            MSWin32  => 'Windows',
7
            MSWin64  => 'Windows',
8
            linux    => 'Linux',
9
            #darwin   => 'MacOSX',
10
        );
11
        $OS{$_} = 'BSD' for qw( freebsd openbsd netbsd );
12
        my $ID = $OS{ $^O } || 'Unknown';
13
        *OSID = sub () { "$ID" }
14
    }
15
}
16
17
{
18
    module_name    => 'Sys::Info',
19
    requires       => {
20
        'Sys::Info::Base'              => '0.72',
21
        'Sys::Info::Driver::' . OSID() => '0.72',
22
        ( $] < 5.006 ? ( 'warnings::compat' => 0 ) : ()),
23
    },
24
    build_requires => {
25
        'Test::Sys::Info' => '0.15',
26
    },
27
    meta_merge     => {
28
        resources => {
29
            repository => 'http://bitbucket.org/burak/cpan-sys-info/',
30
        },
31
    },
32
}
1
use strict;
2
# copy-paste from Sys::Info::Constants
3
BEGIN {
4
    if ( ! defined &OSID ) {
5
        my %OS = (
6
            MSWin32  => 'Windows',
7
            MSWin64  => 'Windows',
8
            linux    => 'Linux',
9
            #darwin   => 'MacOSX',
10
        );
11
        $OS{$_} = 'BSD' for qw( freebsd openbsd netbsd );
12
        my $ID = $OS{ $^O } || 'Unknown';
13
        *OSID = sub () { "$ID" }
14
    }
15
}
16
17
{
18
    module_name    => 'Sys::Info',
19
    requires       => {
20
        'Sys::Info::Base'              => '0.72',
21
        'Sys::Info::Driver::' . OSID() => '0.72',
22
        ( $] < 5.006 ? ( 'warnings::compat' => 0 ) : ()),
23
    },
24
    build_requires => {
25
        'Test::Sys::Info' => '0.15',
26
    },
27
    meta_merge     => {
28
        resources => {
29
            repository => 'http://bitbucket.org/burak/cpan-sys-info/',
30
        },
31
    },
32
}

Up to file-list TODO:

1
* Unified file system information
2
    - Add a database to ::Base to query fs meta data
3
    - Return FS information for all available partitions.
4
* Add new devices
5
    - BIOS -> Easy on Windows through WMI
6
    - Optical
7
    - PCI
8
    - VGA
9
    - Other?
10
* Can there be improvements on the current user detection?
11
* CPU flags on non-Linux OS
12
    - Windows & BSD are currently lacking this. BSD seem to have /proc support
13
        but not intalled by default. So, unreliable.
14
* MacOSX Driver
15
    - I don't own a Mac. If anyone wants to Work on that, just create
16
        Sys::Info::Driver::MacOSX and ping me so that I can enable that
17
        driver in the os detector "OSID".
18
* Improve BSD driver
19
    - I'm testing this on DesktopBSD. Needs to be tested on others as well.
20
* CPU
21
    - bitness() not implemented in BSD & Unknown
22
* OS
23
    - bitness() not implemented in BSD & Unknown
1
* Unified file system information
2
    - Add a database to ::Base to query fs meta data
3
    - Return FS information for all available partitions.
4
* Add new devices
5
    - BIOS -> Easy on Windows through WMI
6
    - Optical
7
    - PCI
8
    - VGA
9
    - Other?
10
* Can there be improvements on the current user detection?
11
* CPU flags on non-Linux OS
12
    - Windows & BSD are currently lacking this. BSD seem to have /proc support
13
        but not intalled by default. So, unreliable.
14
* MacOSX Driver
15
    - I don't own a Mac. If anyone wants to Work on that, just create
16
        Sys::Info::Driver::MacOSX and ping me so that I can enable that
17
        driver in the os detector "OSID".
18
* Improve BSD driver
19
    - I'm testing this on DesktopBSD. Needs to be tested on others as well.
20
* CPU
21
    - bitness() not implemented in BSD & Unknown
22
* OS
23
    - bitness() not implemented in BSD & Unknown