worthmine / Text-vCard-Precisely

Read, Write or Edit vCard 3.0 or 4.0 with perl
https://metacpan.org/pod/Text::vCard::Precisely
Other
3 stars 3 forks source link

V3: EMAIL types case sensitive #25

Closed michaelof closed 4 years ago

michaelof commented 4 years ago

Hi Yuki,

as I've got some issues with V4 vcards, my Android and/or Nextcloud are not dealing well with URI-defined TEL nodes, I've currently switched back to V3.

Works fine, I've just recognized that in contrast to other "types" type definition for EMAIL must be case sensitive lower case home or work, although finally set upper case in vcard.

Guess it's a missing /i in line 17 of https://github.com/worthmine/Text-vCard-Precisely/blob/master/lib/Text/vCard/Precisely/V3/Node/Email.pm:

Maybe

m/^(?:work|home)$/is

instead of current

m/^(?:work|home)$/s

?

michaelof commented 4 years ago

BTW not a very user friendly error msg :-)

Attribute (types) does not pass the type constraint because: Validation failed for 'EmailTypes' with value ARRAY(0x562722dce7d8) at constructor Text::vCard::Precisely::V3::Node::Email::new (defined at /home/michael/perl5/lib/perl5/Text/vCard/Precisely/V3/Node/Email.pm line 40) line 91
        Text::vCard::Precisely::V3::Node::Email::new('Text::vCard::Precisely::V3::Node::Email', 'HASH(0x562722caffb8)') called at /home/michael/perl5/lib/perl5/Text/vCard/Precisely/V3.pm line 517
        Text::vCard::Precisely::V3::__ANON__('ARRAY(0x5627228648a0)') called at /home/michael/perl5/lib/perl5/x86_64-linux-thread-multi/Moose/Meta/TypeCoercion.pm line 65
        Moose::Meta::TypeCoercion::__ANON__('ARRAY(0x5627228648a0)') called at accessor Text::vCard::Precisely::V3::email (defined at /home/michael/perl5/lib/perl5/Text/vCard/Precisely/V3.pm line 519) line 5
        Text::vCard::Precisely::V3::email('Text::vCard::Precisely=HASH(0x56271ca2e428)', 'ARRAY(0x5627228648a0)') called at ....
worthmine commented 4 years ago

thanks for reporting almost everyday! I am feeling that "We're developing an OSS now!"

michaelof commented 4 years ago

Please advice frankly if it's not in your interest! I for sure do NOT want to waste your time. I'm using your modules, they're helping me solving what I want to achieve. And vice versa I want to contribute in helping you testing and make them better. If my perl knowlegde would be better, I would make pull requests instead of just reporting :-)

worthmine commented 4 years ago

You're just right user of this module. I've been searching for like you.

michaelof commented 4 years ago

Tested V3 and V4: Works now :-)

THANK YOU!!!