Acme-Resume

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    you changed the files and the date of any change; and

    b) cause the whole of any work that you distribute or publish, that
    in whole or in part contains the Program or any part thereof, either
    with or without modifications, to be licensed at no charge to all
    third parties under the terms of this General Public License (except
    that you may choose to grant warranty protection to some or all
    third parties, at your option).

    c) If the modified program normally reads commands interactively when
    run, you must cause it, when started running for such interactive use
    in the simplest and most usual way, to print or display an
    announcement including an appropriate copyright notice and a notice
    that there is no warranty (or else, saying that you provide a
    warranty) and that users may redistribute the program under these
    conditions, and telling the user how to view a copy of this General
    Public License.

    d) You may charge a fee for the physical act of transferring a
    copy, and you may at your option offer warranty protection in
    exchange for a fee.

LICENSE  view on Meta::CPAN

                     END OF TERMS AND CONDITIONS

        Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

  To do so, attach the following notices to the program.  It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) 19yy  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 1, or (at your option)
    any later version.

LICENSE  view on Meta::CPAN

    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) 19xx name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your

lib/Acme/Resume.pm  view on Meta::CPAN

Can be used multiple times. Adds an L<Acme::Resume::Types::Education> to the list of educations.

=head2 job

Can be used multiple times. Adds a L<Acme::Resume::Types::Job> to the list of jobs.

=head1 USAGE

One way to read a résumé (apart from reading the source) is with one-liners:

    $ perl -MAcme::Resume::For::ExAmple -E 'say Acme::Resume::For::ExAmple->new->get_job(-1)->started->year'

The L<Acme::Resume::Output::ToPlain> role (used by default) adds a C<to_plain> method:

    $ perl -MAcme::Resume::For::Tester -E 'say Acme::Resume::For::Tester->new->to_plain'

=head1 TODO

More documentation and a complete example.

=head1 SOURCE

lib/Acme/Resume/Output/ToPlain.pm  view on Meta::CPAN

                     $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) {
                    my $start = $job->started;
                    my $left = $job->left;

                    $left = $left->minus_years($start->year);
                    $left = $left->minus_months($start->month);
                    $left = $left->minus_days($start->day_of_month);

                    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;
                }
                elsif($job->current) {
                    my $start = $job->started;
                    my $now = Time::Moment->now;

                    $now = $now->minus_years($start->year);
                    $now = $now->minus_months($start->month);
                    $now = $now->minus_days($start->day_of_month);
                    push @lines => 'Left:     Current job' . ' ' . sprintf '(%d years, %d months and %d days - and counting)', $now->year, $now->month, $now->day_of_month;
                }
                push @lines => "Description:\n" . nudge($job->description), '', '';
            }
        }

        return join "\n" => @lines;
    }

    method formatted_address {

lib/Acme/Resume/Types/Education.pm  view on Meta::CPAN

        predicate => 1,
    );
    has location => (
        isa => Str,
        predicate => 1,
    );
    has program => (
        isa => Str,
        predicate => 1,
    );
    has started => (
        isa => TimeMoment,
        coerce => 1,
    );
    has left => (
        isa => TimeMoment,
        coerce => 1,
        predicate => 1,
    );
    has current => (
        isa => Bool,

lib/Acme/Resume/Types/Job.pm  view on Meta::CPAN

        predicate => 1,
    );
    has location => (
        isa => Str,
        predicate => 1,
    );
    has role => (
        isa => Str,
        predicate => 1,
    );
    has started => (
        isa => TimeMoment,
        coerce => 1,
    );
    has left => (
        isa => TimeMoment,
        predicate => 1,
        coerce => 1,
    );
    has current => (
        isa => Bool,

t/01-basic.t  view on Meta::CPAN

use Acme::Resume::For::Tester;

my $resume = Acme::Resume::For::Tester->new;

is $resume->name, 'The Tester', 'Correct name';
is $resume->email, 'the.tester@example.com', 'Correct email';
is $resume->get_address(-1), 'USA', 'Correct country';

is $resume->get_education(1)->school, 'Owen Patterson High', 'Correct school on second education';

is $resume->get_job(0)->started->year, '1988', 'Correct year on first job';

done_testing;

t/01/lib/Acme/Resume/For/Tester.pm  view on Meta::CPAN

    email 'the.tester@example.com';

    address ['A street 2', 'Inatown', 'USA'];

    phone '+1 (555) 123 4321';

    education {
        school => 'Central West Junior High',
        location => 'Capital City',
        program => 'Junior high',
        started => 'August 25, 1981',
        left => 'June 3, 1984',
        description => 'Junior high.',
    };

    education {
        school => 'Owen Patterson High',
        location => 'Capital City',
        program => 'High School',
        started => 'August 24, 1984',
        left => 'June 4, 1987',
        description => qs{Had glasses.

            Good at math.
        },
    };

    education {
        school => 'Capital City Institute of Technology',
        url => 'http://www.ccit.org/',
        location => 'Capital City',
        program => 'Computer Science',
        started => 'September 2, 1987',
        left => 'May 22, 1990',
        description => 'Top of the class.',
    };

    job {
        company => 'Capital City Institute of Technology Cleaners',
        location => 'Capital City',
        role => 'Cleaner',
        started => 'March 15, 1988',
        left => 'May 22, 1990',
        description => 'Making ends meet.',
    };

    job {
        company => 'Omni Consumer Products',
        location => 'Capital City',
        role => 'Software developer',
        started => 'May 25, 1990',
        left => 'March 31, 1999',
        description => 'Cubicle warrior.',
    };

}

1;



( run in 0.288 second using v1.01-cache-2.11-cpan-0d8aa00de5b )