Devel::Platform::Info

Barbie barbie at missbarbell.co.uk
Wed Jun 1 06:30:19 UTC 2011


On Tue, May 31, 2011 at 09:15:43PM -0400, James E Keenan wrote:
> On 5/31/11 1:12 PM, Jonathan "Duke" Leto wrote:
> >Howdy,
> >
> >The CPAN module Devel::Platform::Info looks interesting:
> 
> My admittedly quick try-out of this module suggests that it would
> not be particularly useful for Parrot at the present time.
> 
> The README (http://cpansearch.perl.org/src/BARBIE/Devel-Platform-Info-0.09/README)
> indicates that use of this module's public methods will return a
> hash with at least the following keys:
> 
> #####
> 
>              source
>              archname
>              osname
>              osvers
>              oslabel
>              is32bit
>              is64bit
>              osflag
> 
> #####
> 
> Of these, only 3 are present in %PConfig -- and those have different
> values from what Devel::Platform::Info returns.  For example,
> comparing the two on my Linux VM:
> 
> # From Devel::Platform::Info
> 'archname' => 'i686',
> 'osname' => 'GNU/Linux',
> 'osvers' => '5.0.3',
> 
> # From lib/Parrot/Config/Generated.pm
> 'archname' => 'i686-linux',
> 'osname' => 'linux',
> 'osvers' => '2.6.18.8-linode22',

The differences are likely because you are not comparing like for like.
DPI osname and osvers are looking at the Operating System, whereas the
Parrot values are looking at the kernel. While some of the modules
within DPI return kernel information, this is not applicable to all
OSes.

The keys listed above are the bare minimum we expect to return, but more
are available if the platform contains additional information, such
kernel information.

Out of interest what OS do you have on your VM? 

Cheers,
Barbie.
-- 
Birmingham Perl Mongers <http://birmingham.pm.org>
Memoirs Of A Roadie <http://barbie.missbarbell.co.uk>
CPAN Testers Blog <http://blog.cpantesters.org>
YAPC Conference Surveys <http://yapc-surveys.org>
Ark Appreciation Pages <http://ark.eology.org>



More information about the parrot-dev mailing list