burak / CPAN-Sys-Info-Driver-Unknown

Compatibility layer for Sys::Info (Perl)

Changed (Δ1.9 KB):

raw changeset »

Build.PL (2 lines added, 0 lines removed)

Changes (1 lines added, 1 lines removed)

README (1 lines added, 1 lines removed)

SPEC (1 lines added, 1 lines removed)

lib/Sys/Info/Driver/Unknown.pm (0 lines added, 14 lines removed)

lib/Sys/Info/Driver/Unknown/Device.pm (0 lines added, 14 lines removed)

lib/Sys/Info/Driver/Unknown/Device/CPU.pm (1 lines added, 15 lines removed)

lib/Sys/Info/Driver/Unknown/Device/CPU/Env.pm (5 lines added, 18 lines removed)

lib/Sys/Info/Driver/Unknown/OS.pm (1 lines added, 15 lines removed)

t/03-basic.t (1 lines added, 0 lines removed)

Up to file-list Build.PL:

@@ -5,6 +5,8 @@ use Build;
5
5
6
6
my $mb = Build->new;
7
7
$mb->change_versions(1);
8
$mb->copyright_first_year( '2006' );
9
$mb->add_pod_author_copyright_license(1);
8
10
$mb->create_build_script;
9
11
10
12
1;

Up to file-list Changes:

@@ -2,7 +2,7 @@ Revision history for Perl extension Sys:
2
2
3
3
Time zone is GMT+2.
4
4
5
0.73 Sun Jun  7 03:10:27 2009
5
0.73 Fri Dec  4 04:25:35 2009
6
6
    => Support new uname().
7
7
8
8
0.72 Thu Apr 23 16:59:18 2009

Up to file-list README:

29
29
LICENSE
30
30
31
31
This library is free software; you can redistribute it and/or modify 
32
it under the same terms as Perl itself, either Perl version 5.10.0 or, 
32
it under the same terms as Perl itself, either Perl version 5.10.1 or, 
33
33
at your option, any later version of Perl 5 you may have available.

Up to file-list SPEC:

1
1
{
2
2
    module_name    => 'Sys::Info::Driver::Unknown',
3
3
    requires       => {
4
        'Sys::Info::Base' => '0.72',
4
        'Sys::Info::Base' => '0.73',
5
5
        ( $] < 5.006 ? ( 'warnings::compat' => 0 ) : ()),
6
6
    },
7
7
    build_requires => {

Up to file-list lib/Sys/Info/Driver/Unknown.pm:

@@ -25,18 +25,4 @@ This is the main module in the C<Unknown
25
25
26
26
None.
27
27
28
=head1 AUTHOR
29
30
31
32
=head1 COPYRIGHT
33
34
35
36
=head1 LICENSE
37
38
This library is free software; you can redistribute it and/or modify 
39
it under the same terms as Perl itself, either Perl version 5.10.0 or, 
40
at your option, any later version of Perl 5 you may have available.
41
42
28
=cut

Up to file-list lib/Sys/Info/Driver/Unknown/Device.pm:

@@ -25,18 +25,4 @@ Base class for Unknown device drivers.
25
25
26
26
None.
27
27
28
=head1 AUTHOR
29
30
31
32
=head1 COPYRIGHT
33
34
35
36
=head1 LICENSE
37
38
This library is free software; you can redistribute it and/or modify 
39
it under the same terms as Perl itself, either Perl version 5.10.0 or, 
40
at your option, any later version of Perl 5 you may have available.
41
42
28
=cut

Up to file-list lib/Sys/Info/Driver/Unknown/Device/CPU.pm:

@@ -13,7 +13,7 @@ BEGIN {
13
13
        require Unix::Processors;
14
14
        Unix::Processors->import;
15
15
    };
16
    $UP = Unix::Processors->new if ! $@;
16
    $UP = Unix::Processors->new if ! $@ && $eok;
17
17
}
18
18
19
19
sub load    {}
@@ -77,18 +77,4 @@ See bitness in L<Sys::Info::Device::CPU>
77
77
78
78
L<Sys::Info>, L<Sys::Info::CPU>, L<Unix::Processors>.
79
79
80
=head1 AUTHOR
81
82
83
84
=head1 COPYRIGHT
85
86
87
88
=head1 LICENSE
89
90
This library is free software; you can redistribute it and/or modify 
91
it under the same terms as Perl itself, either Perl version 5.10.0 or, 
92
at your option, any later version of Perl 5 you may have available.
93
94
80
=cut

Up to file-list lib/Sys/Info/Driver/Unknown/Device/CPU/Env.pm:

@@ -2,6 +2,7 @@ package Sys::Info::Driver::Unknown::Devi
2
2
use strict;
3
3
use warnings;
4
4
use vars qw( $VERSION );
5
use constant RE_VENDOR => qr/(.+?), \s (?:Genuine(Intel)|Authentic(AMD))/xms;
5
6
6
7
$VERSION = '0.70';
7
8
@@ -11,15 +12,15 @@ sub identify {
11
12
    my $self = shift;
12
13
13
14
    if ( ! $self->{META_DATA} ) {
14
        $self->_INSTALL() if not $INSTALLED;
15
        $self->_INSTALL() if ! $INSTALLED;
15
16
16
        if ( not $CPU{id} ) {
17
        if ( ! $CPU{id} ) {
17
18
            $self->{META_DATA} = []; # fake
18
19
            return;
19
20
        }
20
21
21
22
        my($cpu, $count, @cpu);
22
        if ($CPU{id} =~ /(.+?), \s (?:Genuine(Intel)|Authentic(AMD))/xms ) {
23
        if ($CPU{id} =~ RE_VENDOR ) {
23
24
            my $cid  = $1;
24
25
            my $corp = $2 || $3;
25
26
            if ( my %info = $self->_parse( $cid ) ) {
@@ -38,7 +39,7 @@ sub identify {
38
39
            }
39
40
        }
40
41
41
        $count = 1 if not $count;
42
        $count = 1 if !$count;
42
43
        for ( 1..$count ) {
43
44
            push @cpu, {
44
45
                architecture  => ($CPU{id} =~ m{ \A (.+?) \s? Family }xmsi),
@@ -305,18 +306,4 @@ L<Sys::Info>,
305
306
L<http://www.sandpile.org/>,
306
307
L<http://www.paradicesoftware.com/specs/cpuid/index.htm>.
307
308
308
=head1 AUTHOR
309
310
311
312
=head1 COPYRIGHT
313
314
315
316
=head1 LICENSE
317
318
This library is free software; you can redistribute it and/or modify 
319
it under the same terms as Perl itself, either Perl version 5.10.0 or, 
320
at your option, any later version of Perl 5 you may have available.
321
322
309
=cut

Up to file-list lib/Sys/Info/Driver/Unknown/OS.pm:

@@ -16,7 +16,7 @@ BEGIN {
16
16
                 ;
17
17
    *domain_name = *edition
18
18
                 = *logon_server
19
                 = sub {   }
19
                 = sub {}
20
20
                 ;
21
21
}
22
22
@@ -150,18 +150,4 @@ Please see L<Sys::Info::OS> for definiti
150
150
151
151
L<Sys::Info>, L<Sys::Info::OS>.
152
152
153
=head1 AUTHOR
154
155
156
157
=head1 COPYRIGHT
158
159
160
161
=head1 LICENSE
162
163
This library is free software; you can redistribute it and/or modify 
164
it under the same terms as Perl itself, either Perl version 5.10.0 or, 
165
at your option, any later version of Perl 5 you may have available.
166
167
153
=cut

Up to file-list t/03-basic.t:

1
1
#!/usr/bin/env perl -w
2
2
use strict;
3
3
use warnings;
4
## no critic (Variables::RequireLocalizedPunctuationVars)
4
5
BEGIN { $^O = 'SomeFakeValue' }
5
6
use Test::Sys::Info;
6
7