| line | stmt | bran | cond | sub | pod | time | code | 
| 1 | 1 |  |  | 1 |  | 13636 | use MoopsX::UsingMoose; | 
|  | 2 |  |  |  |  | 296 |  | 
|  | 1 |  |  |  |  | 9 |  | 
| 2 | 1 |  |  | 1 |  | 2952 | use 5.14.0; | 
|  | 1 |  |  |  |  | 4 |  | 
| 3 | 1 |  |  | 1 |  | 6 | use strict; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 26 |  | 
| 4 | 1 |  |  | 1 |  | 6 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 66 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 |  |  |  |  |  |  | # ABSTRACT: Role for plain output | 
| 7 |  |  |  |  |  |  | # PODNAME: Acme::Resume::Output::ToPlain | 
| 8 |  |  |  |  |  |  | our $VERSION = '0.0105'; | 
| 9 |  |  |  |  |  |  |  | 
| 10 | 1 |  |  | 1 |  | 4721 | role Acme::Resume::Output::ToPlain { | 
|  | 1 |  |  | 1 |  | 52 |  | 
|  | 1 |  |  | 1 |  | 10 |  | 
|  | 1 |  |  | 1 |  | 2 |  | 
|  | 1 |  |  | 1 |  | 73 |  | 
|  | 1 |  |  | 1 |  | 8 |  | 
|  | 1 |  |  | 1 |  | 3 |  | 
|  | 1 |  |  | 1 |  | 10 |  | 
|  | 1 |  |  | 1 |  | 368 |  | 
|  | 1 |  |  | 1 |  | 3 |  | 
|  | 1 |  |  | 1 |  | 9 |  | 
|  | 1 |  |  | 1 |  | 155 |  | 
|  | 1 |  |  | 1 |  | 2 |  | 
|  | 1 |  |  | 1 |  | 53 |  | 
|  | 1 |  |  |  |  | 19 |  | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 117 |  | 
|  | 1 |  |  |  |  | 42 |  | 
|  | 1 |  |  |  |  | 6 |  | 
|  | 1 |  |  |  |  | 5 |  | 
|  | 1 |  |  |  |  | 8 |  | 
|  | 1 |  |  |  |  | 6033 |  | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 11 |  | 
|  | 1 |  |  |  |  | 5724 |  | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 10 |  | 
|  | 1 |  |  |  |  | 13172 |  | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 10 |  | 
|  | 1 |  |  |  |  | 130 |  | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 9 |  | 
|  | 1 |  |  |  |  | 280 |  | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 10 |  | 
|  | 1 |  |  |  |  | 1442 |  | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 8 |  | 
|  | 1 |  |  |  |  | 3961 |  | 
|  | 1 |  |  |  |  | 5 |  | 
|  | 1 |  |  |  |  | 7 |  | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 41 |  | 
|  | 1 |  |  |  |  | 6 |  | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 58 |  | 
|  | 1 |  |  |  |  | 6 |  | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 128 |  | 
|  | 1 |  |  |  |  | 4715 |  | 
|  | 0 |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 1 |  |  | 1 |  | 584 | use String::Nudge; | 
|  | 1 |  |  |  |  | 536 |  | 
|  | 1 |  |  |  |  | 54 |  | 
| 13 |  |  |  |  |  |  |  | 
| 14 | 1 | 0 |  | 1 |  | 1726 | method to_plain { | 
|  | 1 |  |  | 0 |  | 3 |  | 
|  | 1 |  |  |  |  | 832 |  | 
|  | 1 |  |  |  |  | 16 |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  |  | 
| 16 | 0 |  |  |  |  |  | my @lines = ($self->name, '', | 
| 17 |  |  |  |  |  |  | $self->email, '', | 
| 18 |  |  |  |  |  |  | $self->phone, '', | 
| 19 |  |  |  |  |  |  | $self->formatted_address, ''); | 
| 20 |  |  |  |  |  |  |  | 
| 21 | 0 | 0 |  |  |  |  | if($self->has_education) { | 
| 22 | 0 |  |  |  |  |  | push @lines => 'Education', '-' x length 'education'; | 
| 23 |  |  |  |  |  |  |  | 
| 24 | 0 |  |  |  |  |  | foreach my $edu ($self->all_educations) { | 
| 25 | 0 |  |  |  |  |  | push @lines => 'School:   ' . $edu->school; | 
| 26 | 0 | 0 |  |  |  |  | push @lines => 'Url:      ' . $edu->url if $edu->has_url; | 
| 27 | 0 |  |  |  |  |  | push @lines => 'Location: ' . $edu->location; | 
| 28 | 0 |  |  |  |  |  | push @lines => 'Program:  ' . $edu->program; | 
| 29 | 0 |  |  |  |  |  | push @lines => 'Started:  ' . $edu->started->strftime('%Y-%m-%d'); | 
| 30 | 0 | 0 |  |  |  |  | push @lines => 'Left:     ' . $edu->left->strftime('%Y-%m-%d') if $edu->has_left; | 
| 31 | 0 |  |  |  |  |  | push @lines => "Description:\n" . nudge($edu->description), '', ''; | 
| 32 |  |  |  |  |  |  | } | 
| 33 |  |  |  |  |  |  | } | 
| 34 |  |  |  |  |  |  |  | 
| 35 | 0 | 0 |  |  |  |  | if($self->has_job_history) { | 
| 36 | 0 |  |  |  |  |  | push @lines => '', 'Work experience', '-' x length 'work experience'; | 
| 37 |  |  |  |  |  |  |  | 
| 38 | 0 |  |  |  |  |  | foreach my $job ($self->all_jobs) { | 
| 39 |  |  |  |  |  |  |  | 
| 40 | 0 |  |  |  |  |  | push @lines => 'Company:  ' . $job->company; | 
| 41 | 0 | 0 |  |  |  |  | push @lines => 'Url:      ' . $job->url if $job->has_url; | 
| 42 | 0 |  |  |  |  |  | push @lines => 'Location: ' . $job->location; | 
| 43 | 0 |  |  |  |  |  | push @lines => 'Role:     ' . $job->role; | 
| 44 | 0 |  |  |  |  |  | push @lines => 'Started:  ' . $job->started->strftime('%Y-%m-%d'); | 
| 45 |  |  |  |  |  |  |  | 
| 46 | 0 | 0 |  |  |  |  | if($job->has_left) { | 
|  |  | 0 |  |  |  |  |  | 
| 47 | 0 |  |  |  |  |  | my $start = $job->started; | 
| 48 | 0 |  |  |  |  |  | my $left = $job->left; | 
| 49 |  |  |  |  |  |  |  | 
| 50 | 0 |  |  |  |  |  | $left = $left->minus_years($start->year); | 
| 51 | 0 |  |  |  |  |  | $left = $left->minus_months($start->month); | 
| 52 | 0 |  |  |  |  |  | $left = $left->minus_days($start->day_of_month); | 
| 53 |  |  |  |  |  |  |  | 
| 54 | 0 |  |  |  |  |  | push @lines => 'Left:     ' . $job->left->strftime('%Y-%m-%d') . ' ' . sprintf '(%d years, %d months and %d days)', $left->year, $left->month, $left->day_of_month; | 
| 55 |  |  |  |  |  |  | } | 
| 56 |  |  |  |  |  |  | elsif($job->current) { | 
| 57 | 0 |  |  |  |  |  | my $start = $job->started; | 
| 58 | 0 |  |  |  |  |  | my $now = Time::Moment->now; | 
| 59 |  |  |  |  |  |  |  | 
| 60 | 0 |  |  |  |  |  | $now = $now->minus_years($start->year); | 
| 61 | 0 |  |  |  |  |  | $now = $now->minus_months($start->month); | 
| 62 | 0 |  |  |  |  |  | $now = $now->minus_days($start->day_of_month); | 
| 63 | 0 |  |  |  |  |  | push @lines => 'Left:     Current job' . ' ' . sprintf '(%d years, %d months and %d days - and counting)', $now->year, $now->month, $now->day_of_month; | 
| 64 |  |  |  |  |  |  | } | 
| 65 | 0 |  |  |  |  |  | push @lines => "Description:\n" . nudge($job->description), '', ''; | 
| 66 |  |  |  |  |  |  | } | 
| 67 |  |  |  |  |  |  | } | 
| 68 |  |  |  |  |  |  |  | 
| 69 | 0 |  |  |  |  |  | return join "\n" => @lines; | 
| 70 |  |  |  |  |  |  | } | 
| 71 |  |  |  |  |  |  |  | 
| 72 | 1 | 0 |  | 1 |  | 1190 | method formatted_address { | 
|  | 1 |  |  | 0 |  | 3 |  | 
|  | 1 |  |  |  |  | 115 |  | 
|  | 0 |  |  |  |  |  |  | 
|  | 0 |  |  |  |  |  |  | 
| 73 |  |  |  |  |  |  | return $self->join_address("\n"); | 
| 74 |  |  |  |  |  |  | } | 
| 75 |  |  |  |  |  |  | } | 
| 76 |  |  |  |  |  |  |  | 
| 77 |  |  |  |  |  |  | 1; | 
| 78 |  |  |  |  |  |  |  | 
| 79 |  |  |  |  |  |  | __END__ | 
| 80 |  |  |  |  |  |  |  | 
| 81 |  |  |  |  |  |  | =pod | 
| 82 |  |  |  |  |  |  |  | 
| 83 |  |  |  |  |  |  | =encoding UTF-8 | 
| 84 |  |  |  |  |  |  |  | 
| 85 |  |  |  |  |  |  | =head1 NAME | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | Acme::Resume::Output::ToPlain - Role for plain output | 
| 88 |  |  |  |  |  |  |  | 
| 89 |  |  |  |  |  |  | =head1 VERSION | 
| 90 |  |  |  |  |  |  |  | 
| 91 |  |  |  |  |  |  | Version 0.0105, released 2021-09-29. | 
| 92 |  |  |  |  |  |  |  | 
| 93 |  |  |  |  |  |  | =head1 SOURCE | 
| 94 |  |  |  |  |  |  |  | 
| 95 |  |  |  |  |  |  | L<https://github.com/Csson/p5-Acme-Resume> | 
| 96 |  |  |  |  |  |  |  | 
| 97 |  |  |  |  |  |  | =head1 HOMEPAGE | 
| 98 |  |  |  |  |  |  |  | 
| 99 |  |  |  |  |  |  | L<https://metacpan.org/release/Acme-Resume> | 
| 100 |  |  |  |  |  |  |  | 
| 101 |  |  |  |  |  |  | =head1 AUTHOR | 
| 102 |  |  |  |  |  |  |  | 
| 103 |  |  |  |  |  |  | Erik Carlsson <info@code301.com> | 
| 104 |  |  |  |  |  |  |  | 
| 105 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 106 |  |  |  |  |  |  |  | 
| 107 |  |  |  |  |  |  | This software is copyright (c) 2021 by Erik Carlsson. | 
| 108 |  |  |  |  |  |  |  | 
| 109 |  |  |  |  |  |  | This is free software; you can redistribute it and/or modify it under | 
| 110 |  |  |  |  |  |  | the same terms as the Perl 5 programming language system itself. | 
| 111 |  |  |  |  |  |  |  | 
| 112 |  |  |  |  |  |  | =cut |