Mojolicious-Command-Author-generate-automake_app
view release on metacpan or search on metacpan
lib/Mojolicious/Command/Author/generate/automake_app.pm view on Meta::CPAN
$self->class(pop @dir);
die <<EOF unless $self->class =~ /^[A-Z](?:\w|::)+$/;
Your application name has to be a well formed (CamelCase) Perl module name
like "MyApp".
EOF
$self->cwd(join '/', @dir) if @dir;
my $file = $self->file;
my ($userName,$fullName) = (getpwuid $<)[0,6];
$fullName =~ s/,.+//g;
chomp(my $domain = `hostname -d`);
my $email = $userName.'@'.$domain;
if ( -r $ENV{HOME} . '/.gitconfig' ){
my $in = Mojo::File->new($ENV{HOME} . '/.gitconfig')->slurp;
$in =~ /name\s*=\s*(\S.+\S)/ and $fullName = $1;
$in =~ /email\s*=\s*(\S+)/ and $email = $1;
}
( run in 0.221 second using v1.01-cache-2.11-cpan-8d75d55dd25 )