Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Crypt-PWSafe3 CPAN distribution.

Report information
The Basics
Id: 75145
Status: resolved
Priority: 0/
Queue: Crypt-PWSafe3

People
Owner: tlinden [...] cpan.org
Requestors: luca.filipozzi [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Can't call method "type" on unblessed reference at /usr/local/share/perl5/Crypt/PWSafe3.pm line 390.
Date: Sun, 19 Feb 2012 21:43:07 -0800
To: bug-Crypt-PWSafe3 [...] rt.cpan.org
From: Luca Filipozzi <luca.filipozzi [...] gmail.com>
Hi, I really appreciate your package, Crypt::PWSafe3.  I'm using it to make a command-line enterprise password manager. I'm really pleased with how thorough of an interface to pwsafe3 files you've created. That said, I've encountered one bug.  Here's the relevant snippet from my code (best viewed in fixed width font): my $uuid = $ARGV[0];             my $record = $pwsafe->getrecord($uuid) or print "no such record '$uuid'\n" and return;             print 'group:    ' . $record->group  . "\n" if $record->group;             print 'title:    ' . $record->title  . "\n" if $record->title;             print 'username: ' . $record->user   . "\n" if $record->user;             print 'password: ' . $record->passwd . "\n" if $record->passwd;             print 'notes:    ' . $record->notes  . "\n" if $record->notes;  ### BUG IS HERE             $record->atime(time);             $pwsafe->addrecord($record);             $pwsafe->markmodified();             $pwsafe->save(); ### AND CAUSES PROBLEM HERE If I call $record->notes, then the $pwsafe->save() dies with the error in the subject line. If I comment out the line where $record->notes is called, then save() succeeds. This only happens on records where the notes field is empty. I've created records in the vault using both Crypt::PWSafe3 and Java PasswordSafe. When the notes field is populated, everything works correctly. When the notes field is empty, the unblessed reference error is generated even if only the existence of the notes is checked. I hope that this bug report proves useful. Let me know if you would like more information. Thanks for your great work, Luca -- Luca Filipozzi
Subject: [rt.cpan.org #75145] Can't call method "type" on unblessed reference at /usr/local/share/perl5/Crypt/PWSafe3.pm line 390.
Date: Mon, 20 Feb 2012 14:53:33 -0800
To: bug-Crypt-PWSafe3 [...] rt.cpan.org
From: Luca Filipozzi <luca.filipozzi [...] gmail.com>
In case it is of use to others, my workaround is to set notes to a non-empty string such as 'intentionally empty' if empty: $record->notes('intentionally empty') unless $record->notes; # rt.cpan.org #75145 workaround
fixed in 1.04