-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined value at line 208 #39
Comments
Have found the 'problem' with the address books - this error seems to occur if the N: field is not present for an entry. There are many such entries in the address books I want to process, surely there must be an easy error trap? |
This change to _copy_name seems to fix it although I don't get the text "undefined" that I expected. Must learn more about OO Perl :-) sub copy_name {
} |
Finally got there ("undefined") should be (["undefined"]) although I now prefer ([""]). Hope this test for the N field in the vCard to be present can be included in the module? |
thanks @hrossmvn will look at this when there's another review of this module - I'll leave the issue open until then |
I just stumbled over this problem, it seems to be still there. It can be triggered with this simple test: #!/usr/bin/perl
use strict;
use warnings;
use vCard;
my $filename = '/tmp/foo.vcf';
my $out = vCard->new;
$out->full_name( 'test' );
$out->as_file( $filename );
my $in = vCard->new;
$in->load_file( $filename );
printf "%f\n", $in->full_name; The error comes from |
Sorry, my Perl isn't good enough to fix this myself....
The full error text is 'Can't call method "family" on an undefined value at C:/Strawberry/perl/site/lib/vCard/AddressBook.pm line 208
This happens with 2 different address books downloaded from my webmail and a colleagues webmail. I have made a simple address book which works ok so it shouldn't be anything in my setup,
Ross
The text was updated successfully, but these errors were encountered: