Contact

Contact, Address, Name, etc Parsing

Contact

Synopsis

#!/usr/bin/env raku
use v6.d;

use lib '../lib';
use Data::Dump::Tree;

use Contact;

my ( $country, $text );

#[
$country = 'USA';

$text = q:to/END/;
John Doe,
123, Main St.,
Springfield,
IL 62704
END
#]

#[
$country = 'UK';

$text = q:to/END/;
Dr. Jane Doe,
Sleepy Cottage,
123, Badgemore Lane,
Henley-on-Thames,
Oxon,
RG9 2XX
END
#]

my Contact $contact .= new: :$country, :$text;

ddt  $contact;
say ~$contact;
say  $contact.to-json;

you are welcome to view / raise issues / make PRs if you would like to contribute...

TODOs

  • add Email::Address (dependency)

  • add more countries (GE, FR ...)

Copyright

copyright(c) 2023 Henley Cloud Consulting Ltd.

Contact v0.0.1

Contact, Address, Name, etc Parsing

Authors

  • librasteve

License

Artistic-2.0

Dependencies

Grammar::TracerData::Dump::TreeJSON::Class:auth<zef:vrurg>

Test Dependencies

Provides

  • Contact
  • Contact::Address
  • Contact::Address::GrammarBase
  • Contact::Address::UK::Parse
  • Contact::Address::USA::Parse

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.