The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Arbeitsagentur::Search - Search for Jobs & Applicants via Arbeitsagentur.de

SYNOPSIS

 package MySearch;
 use WWW::Arbeitsagentur::Search;

 my $search = MySearch->new('job'  => 'Perl Job',
                            'user' => 'username@arbeitsagentur'
                            'pw'   => 'mypassword@arbeitsagentur',
                            'mech' => WWW::Mechanize->new(),
                           );
 $search->search_my_way;

 sub search_my_way{
     my $self = shift;
     $self->connect();
     # do other stuff
     $self->collect_result_pages;
     return $self->count_results;
 }

DESCRIPTION

This module is the base class for all search classes. It inherits from WWW::Arbeitsagentur and provides methods to collect search results and save them to disk.

METHODS

$search->save_results()

Saves the result pages in the directory determined by $search->path. Returns the number of errors(!).

 Usage:
        # After successful search:
        $search->collect_result_pages();
        $search->path( 'download/' );   # where to save the files.
        $search->save_results();

$search->save_page( $page_id )

Save a page from the result list to $search->path.

Parameter: index number of the page to be saved from array $self->results.

Return 0 on failure, 1 on success.

 Usage:
        # primitive filtering:
        my $page = $search->result(5);       
        if ($page =~ m/Perl Coder/){
                $search->save_page(5);
        }

$search->collect_result_pages()

If our search was successful, this method collects all jobs / applicants found on the result pages. Data is stored in the array $search->results.

Returns the number of pages found.

$search->select_job()

Selects a job description in a search form on http://www.arbeitsargentur.de.

 Usage:
        # After navigating the mech to the search form:
        $search->beruf('Perl Coder');
        $search->select_job();

Returns 1 if a matching job-description was found. Returns 0 on failure.

SEE ALSO

http://arbeitssuche.sourceforge.net

AUTHOR

Ingo Wiarda dewarim@users.sourceforce.net

ACKNOWLEDGMENTS

This module is based upon http://arbeitssuche.sourceforge.net, written by Ingo Wiarda and Stefan Rother.

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Ingo Wiarda

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.