LCFG-Build-Skeleton

 view release on metacpan or  search on metacpan

lib/LCFG/Build/Skeleton.pm  view on Meta::CPAN

    default       => sub {
        $_[0]->lcfg_component eq 'yes'
            ? 'The LCFG ' . $_[0]->name . ' component'
            : q{};
    },
);

has 'author_name' => (
    is            => 'rw',
    isa           => 'Str',
    default       => sub { ( getpwuid $< )[6] },
    documentation => 'Name of the author',
);

has 'author_email' => (
    is            => 'rw',
    isa           => 'LCFG::Types::EmailAddress',
    builder       => '_default_email',
    documentation => 'Email address for the author',
);

sub _default_email {

    my $email;
    if ( $ENV{EMAIL} ) {
        $email = $ENV{EMAIL};
    } else {
        my $username = ( getpwuid $< )[0];

        my ( $hostname, @domain ) = split /\./, Sys::Hostname::hostname;

        my $domain = join q{.}, @domain;
        $email  = join q{@}, $username, $domain;
    }

    return $email;
}



( run in 0.378 second using v1.01-cache-2.11-cpan-8d75d55dd25 )