Acme-Resume
view release on metacpan or search on metacpan
lib/Acme/Resume/Output/ToPlain.pm view on Meta::CPAN
use String::Nudge;
method to_plain {
my @lines = ($self->name, '',
$self->email, '',
$self->phone, '',
$self->formatted_address, '');
if($self->has_education) {
push @lines => 'Education', '-' x length 'education';
foreach my $edu ($self->all_educations) {
push @lines => 'School: ' . $edu->school;
push @lines => 'Url: ' . $edu->url if $edu->has_url;
push @lines => 'Location: ' . $edu->location;
push @lines => 'Program: ' . $edu->program;
push @lines => 'Started: ' . $edu->started->strftime('%Y-%m-%d');
push @lines => 'Left: ' . $edu->left->strftime('%Y-%m-%d') if $edu->has_left;
push @lines => "Description:\n" . nudge($edu->description), '', '';
}
}
if($self->has_job_history) {
push @lines => '', 'Work experience', '-' x length 'work experience';
foreach my $job ($self->all_jobs) {
push @lines => 'Company: ' . $job->company;
push @lines => 'Url: ' . $job->url if $job->has_url;
push @lines => 'Location: ' . $job->location;
push @lines => 'Role: ' . $job->role;
push @lines => 'Started: ' . $job->started->strftime('%Y-%m-%d');
if($job->has_left) {
t/00-report-prereqs.t view on Meta::CPAN
if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) {
push @dep_errors, "$mod is not installed ($req_string)";
}
}
}
if ( @reports ) {
push @full_reports, "=== $title ===\n\n";
my $ml = _max( map { length $_->[0] } @reports );
my $wl = _max( map { length $_->[1] } @reports );
my $hl = _max( map { length $_->[2] } @reports );
if ($type eq 'modules') {
splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports;
}
else {
splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports;
}
( run in 0.599 second using v1.01-cache-2.11-cpan-65fba6d93b7 )