Text::vCard::Precisely::V4 - Read, Write and Edit vCards 4.0
You can unlock types that will be available in vCard 4.0
my $vc = Text::vCard::Precisely->new( version => '4.0' ); # Or you can write like below: #my $vc = Text::vCard::Precisely::V4->new();
The Usage is same with Text::vCard::Precisely::V3
This module is an additional version for reading/writing for vCard 4.0. it's just a wrapper of Text::vCard::Precisely::V3 with Moose.
Caution! It's NOT be recommended because some reasons below:
Mac OS X and iOS can't parse vCard4.0 with UTF-8 precisely.
Android 4.4.x can't parse vCard4.0.
Note that the vCard RFC requires FN type. And this module does not check or warn if these conditions have not been met.
SAME as 3.0
Returns the vCard as a string. You HAVE TO use encode_utf8() if your vCard is written in utf8
Write data in vCard format to $filename.
Dies if not successful.
These methods accept and return strings.
Returns Version number of the vcard. Defaults to '3.0'
It is READONLY method. So you can NOT downgrade it to 3.0
To specify revision information about the current vCard
The format in as_string() is different from 3.0, but the interface is SAME
They are based on Moose with coercion
So these methods accept not only ArrayRef[HashRef] but also ArrayRef[Str], single HashRef or single Str
Read source if you were confused
The format is SAME as 3.0
Both are same method with Alias
LABEL param and GEO param are now available
They are same method at all with Alias
To specify the language(s) that may be used for contacting the entity associated with the vCard
It's the new method in 4.0
I don't think they are so popular paramater, but here are the methods!
They are the new method in 4.0
The formats are SAME as 3.0
I don't think they are so popular types, but here are the methods!
To specify the kind of object the vCard represents
The date of marriage, or equivalent, of the object the vCard represents
To specify the components of the sex and gender identity of the object the vCard represents
They're DEPRECATED in 4.0
Use SORT-AS param instead of it
Use LABEL param in ADR instead of it
There is no method for these, just warn if you use them
Use AGENT param in RELATED instead of it
If you want to send precisely the vCard with UTF-8 characters to the ALMOST of smartphones, Use 3.0
It seems to be TOO EARLY to use 4.0
This module uses \P{ascii} in regexp so You have to use 5.12.5 and later
And this module uses Data::Validate::URI and it has bug on 5.8.x. so I can't support them
RFC 6350
Text::vCard::Precisely::V3 on GitHub
vCard on Wikipedia
Yuki Yoshida(worthmine)
This is free software; you can redistribute it and/or modify it under the same terms as Perl.
To install Text::vCard::Precisely, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::vCard::Precisely
CPAN shell
perl -MCPAN -e shell install Text::vCard::Precisely
For more information on module installation, please visit the detailed CPAN module installation guide.