Sys-Info-Driver-OSX

 view release on metacpan or  search on metacpan

lib/Sys/Info/Driver/OSX/OS.pm  view on Meta::CPAN

    require POSIX;
    require Sys::Info::Device;

    my $cpu       = Sys::Info::Device->new('CPU');
    my $arch      = ($cpu->identify)[0]->{architecture};
    my %swap      = $self->_probe_swap;
    my %vm_stat   = vm_stat();
    my %info;

    # http://jaharmi.com/2007/05/11/read_the_mac_os_x_edition_and_version_from_prope
    # desktop: /System/Library/CoreServices/SystemVersion.plist
    my $has_server = -e $FILE{server_version};

    $info{manufacturer}              = 'Apple Inc.';
    $info{build_type}                = $has_server ? 'Server' : 'Desktop';
    $info{owner}                     = undef;
    $info{organization}              = undef;
    $info{product_id}                = undef;
    $info{install_date}              = $self->_install_date;
    $info{boot_device}               = undef;



( run in 0.465 second using v1.01-cache-2.11-cpan-299005ec8e3 )