#!perl

use strict;
use warnings;
use App::Github::Email;
use Getopt::Long 'GetOptions';

# ABSTRACT: A command line tool to get a list of email addresses from particular Github account.
our $VERSION = '0.1.0';    # VERSION

my $username;

GetOptions("name=s" => \$username) or die "Error.";

if (not defined $username)
{
    die
        "Error. Username is not defined. Please try again with: 'github-email -n username'.\n";
}

my @addresses = App::Github::Email::get_user($username);

for my $address (@addresses)
{
    print $address . "\n";
}

=head1 SYNOPSIS

    github-email --name <github username>

    # Examples

    github-email --name faraco
    github-email -n faraco
=cut

