2011-07-14 48 views
3

:少なくともCPUデバイスが存在する場合に
If DEVICE_ID has the value of available, then the names of the available devices will be returned.のSys ::情報 - <a href="http://search.cpan.org/perldoc?Sys%3a%3aInfo%3a%3aDevice" rel="nofollow">Sys::Info::Device</a>からの質問

なぜ$info->device('available');リターン・ノーデバイスもしませんか?

#!/usr/local/bin/perl 
use warnings; 
use 5.014; 
use Sys::Info; 

my $info = Sys::Info->new; 

my @available = $info->device('available'); 
say 'Available devices: ', scalar @available; 

my $cpu = $info->device('CPU'); 
say 'Number of cores: ', $cpu->count; 

出力:

利用可能なデバイス:コアの0
数:2

答えて

2

私は、Mac OS Xボックスでこれを実行している同じ出力が得られます。 developerにお問い合わせください。

関連する問題

 関連する問題