10.07.2015 Views

Beginning Web Development With Perl : From Novice to ... - Nabo

Beginning Web Development With Perl : From Novice to ... - Nabo

Beginning Web Development With Perl : From Novice to ... - Nabo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

■INDEX 341mod_cgi vs. mod_perl execution of,187–188, 201output problems with forms usingmod_cgi vs. mod_perl, 190–193permissions and system interaction, 73printing content-type of uploaded file, 80pros and cons of system interaction with,26–27security of, 31taint mode, 32–33using system processes within, 85viewing environment variables in, 23–24CGI::Carp module, 35–39about Carp module and, 35configuring fatal errors <strong>to</strong> display inbrowsers, 36–38security for, 47cgi-lib.pl, 4checking e-mailMail::Box for, 117–118Net::POP3 for, 107–117child processesApache request handling with, 184, 186forking, 186–187chomping, 240, 241–242chunking, 286classes of SOAP::Lite, 139clearingcookies, 16namespaces, 189, 203CLI (command-line interface), 70closedir() function, 77closing filehandles, 76command-line interface (CLI), 70comments, 242–243Common Gateway Interface. See CGIcompilingMason, 265–267options for mod_perl, 198components, 270–274defined, 254get_year, 280illustrated, 271syntax of, 271–272<strong>to</strong>p-level, 264using, 270–271concatenation opera<strong>to</strong>r, 302conditionalsIF-ELSIF-ELSE, 252–253modified within Mason page, 272short-circuited evaluation of, 325SWITCH and CASE, 253within Mason page, 271–272configuringMason, 268Mason and Apache, 267–269mod_perl, 198–199, 206–207connecting <strong>to</strong> databasedatabase handles and, 52–53steps for, 56troubleshooting connections, 70content event handlers for XML::SAX, 173,174content() method, 216convertingbetween strings and numbers, 292–293web sites <strong>to</strong> Mason, 233cookie_jar attribute, 101cookies, 15–23checking data from, 34creating with CGI module, 18defined, 15expiration dates for, 19–20handling for LWP modules, 101limitations for using, 16–17parameters for, 16prompting on receipt of, 17reading, 224–225retrieving, 18–19secure, 223–224sending multiple, 21–22sending with Apache::Cookie, 223setting, 17working with Apache::Cookie class,222–225creating RSS channel, 159–162credentials() method, 101–102■DData::Dumper module, 168–170datachecking cookie, 34untainting, 33using untrusted, 33–34data source names (DSNs), 51–52data types, 285–293numbers, 285–288setting in SOAP::Lite, 145–146strings, 288–291database driversDSNs corresponding <strong>to</strong>, 52listing installed, 50–51database handlesconnecting <strong>to</strong> database with, 52–53, 56defined, 50disconnect() method, 57do() method for, 62quote() method for, 61–62databases, 49–72binding parameters, 62–63connecting <strong>to</strong>, 56creating HTML table, 67–69database handles, 52–53disconnecting from, 57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!