Next:
18. Subroutines
Up:
Server Side Scripting
Previous:
17.2 When and How
Contents
IV
. Advanced Perl Stuff
Subsections
18
. Subroutines
18
.
1
What is a Subroutine?
18
.
2
A Basic Subroutine
18
.
3
Arguments
18
.
4
Return Value
18
.
5
Applications
18
.
5
.
1
Readability Improvement
18
.
5
.
2
Code Simplificiation
18
.
6
Passing by Reference
19
. Your Own Modules
19
.
1
Resources
19
.
2
The Need
19
.
3
Mine isn't Ours!
19
.
4
A Simple Case
19
.
5
How about subroutines?
19
.
6
Where to put module files?
19
.
7
Exporting names
19
.
8
Object Oriented Programming?
19
.
8
.
1
What is a Perl Object?
19
.
8
.
2
What is a Perl Class?
19
.
8
.
3
What is a Perl Method?
19
.
8
.
4
Example
20
. Debugging
20
.
1
Using a Log File
20
.
1
.
1
Opening a File for Writing
20
.
1
.
2
Writing to the Log File
20
.
1
.
3
Closing the Log File
21
. eCommerce
21
.
1
Authorization: How it Works
21
.
2
LWP Library of WWW for Perl
21
.
2
.
1
Simple Request
21
.
2
.
2
Side-track: Page Content ``Borrowing''
21
.
2
.
3
POSTing
21
.
2
.
4
What about HTTPS?
21
.
2
.
5
What about Cookies?
21
.
2
.
6
Security Issues
21
.
3
Alternatives
22
. Email from Perl
22
.
1
Mail::Sender
22
.
2
Just Sending a Message
22
.
3
Sending Attachments
22
.
4
Things to Watch Out For
22
.
5
Digging Deeper
22
.
5
.
1
What is Multipart?
22
.
5
.
2
Content encoding: base64
22
.
5
.
3
What is MIME?
22
.
5
.
4
Content Type
23
. Graphics and the GD Modules
24
. Final Presentation
24
.
1
Purpose of the Presentation
24
.
2
Structure of the Presentation
24
.
2
.
1
Self Introduction
24
.
2
.
2
Your Project(s)
24
.
2
.
3
Relating to CISW420
24
.
2
.
4
Summary
24
.
3
Grading
Copyright © 2008-05-09 by Tak Auyeung