.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "WWW::Search::Pagesjaunes 3pm" .TH WWW::Search::Pagesjaunes 3pm "2018-11-25" "perl v5.28.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" WWW::Search::Pagesjaunes \- Lookup phones numbers from www.pagesjaunes.fr .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use WWW::Search::Pagesjaunes; \& \& my $pj = new WWW::Search::Pagesjaunes; \& $pj\->find( activite => "Plombier", localite => "Paris" ); \& \& do { \& print $_\->entry . "\en" foreach ($pj\->results); \& } while $pj\->has_more; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The WWW::Search::Pagesjaunes provides name, phone number and addresses of French telephone subscribers by using the directory. .SH "METHODS" .IX Header "METHODS" Two classes are used in this module, a first one (WWW::Search::Pagesjaunes) to do the fetching and parsing, and the second one and a second one (WWW::Search::Pagesjaunes::Entry) holding the entry infos. .PP Here are the methods for the main WWW::Search::Pagesjaunes module: .IP "\fBnew()\fR" 4 .IX Item "new()" The constructor accept an optional LWP::UserAgent as argument, if you want to provide your own. .ie n .IP "find( %request )" 4 .el .IP "find( \f(CW%request\fR )" 4 .IX Item "find( %request )" Here are the values for the \f(CW%request\fR hash that are understood. They each have two name, the first is the french one and the second is the english one: .RS 4 .IP "nom / name" 4 .IX Item "nom / name" Name of the person you're looking for. .IP "activite / business" 4 .IX Item "activite / business" Business type of the company you're looking for. Note that if this field is filled, the module searches in the yellow pages. .IP "localite / town" 4 .IX Item "localite / town" Name of the town you're searching in. .IP "prenom / firstname" 4 .IX Item "prenom / firstname" First name of the person you're looking for. It is not set if you set the \&'activite' field. .IP "departement / district" 4 .IX Item "departement / district" Name or number of the Département or Région you're searching in. .RE .RS 4 .RE .IP "\fBresults()\fR" 4 .IX Item "results()" Returns an array of WWW::Search::Pagesjaunes::Entry containing the first matches of the query. .IP "limit($max_number_of_entries)" 4 .IX Item "limit($max_number_of_entries)" Set the maximum number of entries returned. Default to 50. .IP "\fBhas_more()\fR" 4 .IX Item "has_more()" If the query leads to more than a few results, the field has_more is set. You can then call the \fBresults()\fR method again to fetch the datas. .PP The WWW::Search::Pagesjaunes::Entry class has six methods: .ie n .IP "new($name, $address, $phone, $fax)" 4 .el .IP "new($name, \f(CW$address\fR, \f(CW$phone\fR, \f(CW$fax\fR)" 4 .IX Item "new($name, $address, $phone, $fax)" Returns a new WWW::Search::Pagesjaunes::Entry. .IP "name" 4 .IX Item "name" Returns the name of the entry. .IP "address" 4 .IX Item "address" Returns the address of the entry. .IP "phone" 4 .IX Item "phone" Returns the phone number of the entry. .IP "is_fax" 4 .IX Item "is_fax" Returns true if the phone number is a fax one, false otherwise. Note that currently, this method always returns 0. .IP "entry($separator)" 4 .IX Item "entry($separator)" Returns the concatenation of the name and the phone number, separated by \&\*(L" \- \*(R". You can specify your own separator as first argument. .SH "BUGS" .IX Header "BUGS" The phone numbers are sometimes not correctly parsed, esp. when one entry has several phone numbers. .PP If you found a bug and want to report it or send a patch, you are encouraged to use the \s-1CPAN\s0 Request Tracker interface: .SH "COPYRIGHT" .IX Header "COPYRIGHT" Please read the Publisher information of available at the following \s-1URL:\s0 .PP WWW::Search::Pagesjaunes is Copyright (C) 2002, Briac Pilpré .PP This module is free software; you can redistribute it or modify it under the same terms as Perl itself. .SH "AUTHOR" .IX Header "AUTHOR" Briac Pilpré