Skip to content

Commit

Permalink
Merge pull request #11 from hollie/fix_issue_10
Browse files Browse the repository at this point in the history
Fix issue 10: we don't support invalid xPL messages
  • Loading branch information
hollie committed Nov 7, 2012
2 parents ab29249 + 42104f5 commit a08416e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ META.yml
MYMETA.yml
nytprof.out
pm_to_blib
*~
*.tmp
*.log
2 changes: 1 addition & 1 deletion lib/xPL_Items.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ sub tie_value_convertor {
sub device_monitor {
my ( $self, $monitor_info ) = @_;
if ($monitor_info) {
my ($key,$value) = $monitor_info =~ /(\S+)\s*[:=]\s*(.+)/;
my ($key,$value) = $monitor_info =~ /(\S+)\s*[:=]\s*(\S+)/;
if ( !( $value or $value =~ /^0/ ) ) {
$value = ($key) ? $key : $monitor_info;
$key = 'device';
Expand Down

0 comments on commit a08416e

Please sign in to comment.