⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch01.htm

📁 Web_Programming_with_Perl5,一个不错的Perl语言教程。
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">



<HTML>







<HEAD>



<!-- This document was created from RTF source by rtftohtml version 3.0.1 -->







	<META NAME="GENERATOR" Content="Symantec Visual Page 1.0">



	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">



	<TITLE>Without a title - Title</TITLE>



</HEAD>







<BODY BACKGROUND="r2harch.gif" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/r2harch.gif" TEXT="#000000" BGCOLOR="#FFFFFF">







<H2 ALIGN="CENTER"><A HREF="fm.htm" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/fm.htm"><IMG SRC="blanprev.gif" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/blanprev.gif" WIDTH="37" HEIGHT="37"



ALIGN="BOTTOM" BORDER="2"></A><A HREF="index-1.htm" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/index-1.htm"><IMG SRC="blantoc.gif" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/blantoc.gif" WIDTH="42"



HEIGHT="37" ALIGN="BOTTOM" BORDER="2"></A><A HREF="ch02.htm" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/ch02.htm"><IMG SRC="blannext.gif" tppabs="http://210.32.137.15/ebook/Web%20Programming%20with%20Perl%205/blannext.gif"



WIDTH="45" HEIGHT="37" ALIGN="BOTTOM" BORDER="2"></A><FONT COLOR="#0000AA"><BR>



<BR>



1</FONT><BR>



<A NAME="Heading1"></A><FONT COLOR="#000077">Introduction and Overview<BR>



</FONT>



<HR>



</H2>







<UL>



	<LI><A HREF="#Heading1">Introduction and Overview</A>



	<UL>



		<LI><A HREF="#Heading2">What This Book Is and Is Not</A>



		<UL>



			<LI><A HREF="#Heading3">What This Book Is Not</A>



			<LI><A HREF="#Heading4">What This Book Will Provide</A>



			<LI><A HREF="#Heading5">The Layout of This Book</A>



		</UL>



		<LI><A HREF="#Heading6">A CPAN Overview</A>



		<UL>



			<LI><A HREF="#Heading7">CPAN History</A>



			<LI><A HREF="#Heading8">CPAN Motivation</A>



			<LI><A HREF="#Heading9">CPAN Layout</A>



			<LI><A HREF="#Heading11">CPAN Sites</A>



		</UL>



		<LI><A HREF="#Heading12">Summary</A>



	</UL>



</UL>







<P>



<HR>



</P>







<UL>



	<LI>What This Book Is and Is Not



	<P>



	<LI>A CPAN Overview



</UL>







<P>It's more than a little bit intimidating to take on the task of writing an intermediate-to-advanced-level



book on the subject of World Wide Web programming. The current level of innovation



and the rate at which new ideas and techniques are being implemented on the Web is



nothing less than exponential. Each new idea or new technique has the potential for



adding to or enhancing the vast structure that already is the Web, or refining that



structure, making it potentially less cumbersome and easier to understand. Some ideas



are adopted as standards, and others fizzle and die lonely little deaths, for lack



of use or interest. Keeping up with this process and attempting to deliver a book



that will give you, the reader, a feel for which of these ideas and techniques seems



to be the most usable, safe, and powerful, is what this book is all about.</P>



<P>Now, with all of that said, we're going to refine our task (thankfully) to the



exploration and discussion of Web innovations related to Perl, the general purpose



scripting language which is widely used and loved by many people all over the world.



We'll also generally limit this work to discussions and examples which implement



the features and functionality of Version 5 of Perl, which is the latest and greatest



release.</P>



<P>So, that would seem to carve out a nice little niche, yes? Even though this seems



like a relatively small development space to confine one's research to, it in fact



includes the vast majority of the Web tools and innovations which are being used



out there. Perl, and specifically Perl5 is, in fact, the cornerstone of the interactive



Web as it exists today. The many ways that people use Perl to implement the features



and functionality of their Web pages are as dynamic and subject to innovation, enhancement,



and errors, and lonely deaths, as any other component of the Web in general, and



probably even more so.</P>



<P>&quot;So why bother?&quot; you might ask. If any such undertaking might be outdated



and possibly even moot, by the time it is finished, then what's the point in attempting



it in the first place? We'd have to answer that we've asked ourselves this question



quite often in the research and preparation for this book. Maybe that fact is sufficient



to justify the undertaking. Maybe not. Our primary motivation is simply that, at



the present time, there just aren't a lot of books out there which explore the capabilities



of Perl5 as it is used in Web programming. There are two primary reasons why this



is true. The first is that Perl, as a programming language, wasn't designed with



the Web in mind at all. It's been around for a long time, at least in &quot;Internet



Years,&quot; but its first and primary function was, and still is, according to its



author, Larry Wall, &quot;Text processing the UNIX way.&quot; In fact, that's where



it got its name, as PERL stands for Practical Extraction and Report Language.</P>



<P>The first release of Perl5 just happened to coincide with the explosion of popularity



of the HTTP/HTML server/protocol, and now everybody seems to have a Web page. And



what's a Web page without a little CGI to give the browser some entertainment, or



gather some data, or, yes, even make a sale or two. Now, there are plenty of ways



to write a CGI script, but the most popular, for its ease of use, security features,



and now with version 5, reusable modules, is Perl.</P>



<P>As we've said, the Web is dynamic, and always changing, especially in these, its



early years. It's hard to believe sometimes, at least for me, but the Web is still



but a toddler as a technology and protocol. There are a lot of things which are still



being decided at high levels, to add functionary, reduce bandwidth, and generally



enhance the specifications of the protocol which is HTTP, and CGI. Some commercial



entities, like Netscape, have even taken it upon themselves to implement features



and functionary in their own browsers and servers which haven't been formally adopted.



This has generally been a good thing, from our standpoint, but it does fly in the



face of the long-standing tradition of the discussion and adoption of new techniques/features



in any protocol. Regardless, given their market share, they do seem to have some



leeway.</P>



<P>Similarly, Perl is a dynamic entity. The new object oriented features and capabilities



which come with Perl, and the tremendous amount of work which has been done to design



and implement reliable &quot;class libraries,&quot; or modules, to take advantage



of these features can definitely be considered a &quot;work in progress.&quot; Enhancements,



patches, and new features are coming along almost daily. Occasionally this may lead



to a bit of confusion, and sometimes incompatibility, with the current status or



version of a given Perl5 module. It's sort of up to you, as a Perl user, to try to



keep up with the latest changes. It's up to us, as the authors, to try to help you



understand how to do that.</P>



<P>We don't expect this book to go through umpteen reprints, as a truly lasting bit



of prose or a high-minded mathematics text might. We do expect to be able to look



back when we're done and be able to say that, as of that date, we wrote about the



most widely used and accepted techniques, and that we covered most of the latest



and most promising developments that relate to Web programming with Perl5, minimally



providing you with a means to keep up with them, their implementation, and their



implementors. We sincerely hope that the concepts, techniques, and technologies which



we choose to write about here will indeed be among the ones which last. But only



time will tell.</P>



<P>So, here we go...



<H3 ALIGN="CENTER"><A NAME="Heading2"></A><FONT COLOR="#000077">What This Book Is



and Is Not</FONT></H3>



<P>Most of the relevant subjects, examples, and code will be assumed to be implemented



on a UNIX system. There's just not enough time, or cross-platform capability, to



deal with issues specific to other architectures in depth.



<H4 ALIGN="CENTER"><A NAME="Heading3"></A><FONT COLOR="#000077">What This Book Is



Not</FONT></H4>



<P>This isn't a book for &quot;clueless newbies.&quot; We are going to assume that



you are familiar with the fundamentals of Web programming, and the protocols, syntax,



and conventions which comprise all of HTML/CGI, and HTTP in their latest version.



There are a plethora of texts available which document this stuff, and if you're



like me, you've probably bought several texts from various publishers, and read FAQs



and Web-based tutorials until your eyes rolled back in your head. If not, then we



will provide you with a fairly complete set of references to which you can refer



to find other references, texts, and information which will refresh your memory or



help you obtain the level of knowledge you will need about the above topics to fully



understand the examples.</P>



<P>A basic understanding of Perl programming, at least with respect to datatypes,



subroutines, operators, and syntax will also be assumed. Again, we'll provide suggestions



for other documents and texts which will bring you up to speed on Perl programming



in general, if you've not been exposed to it before, or if you need a refresher course.</P>



<P>We also would like for you to actually understand how the examples really work,



and how you can modify them to suit your needs, when you're done reading this book.



Thus, our aim is to avoid canned scripts, or examples which are specific to some



particular need. We'll try to provide explanations, along with the examples, in a



verbose form throughout the text, and we'll try to make the examples generic enough



to fit your needs, but with some modifications.</P>



<P>Finally, this book is not just about Perl. Our aim is to provide a comprehensive



overview of most or all of the tasks which face the typical Webmaster, or Web Team.



The emphasis, where appropriate, will be on implementation of any specific task with



Perl, but we'll also explore certain tasks and aspects of managing a Web site which



have very little, or nothing to do with Perl. In order to make this book as complete



a reference as possible, and cover important topics like security, configuration



management, server configuration, and certain other tools and processes, we'll have



to provide information which may have little or nothing to do with Perl. When this



is necessary, we'll try to note it in the text, and get back to Perl as soon as we



can.



<H4 ALIGN="CENTER"><A NAME="Heading4"></A><FONT COLOR="#000077">What This Book Will



Provide</FONT></H4>



<P>Since this book will provide a large number of examples which use Perl5, we'll



devote a full chapter to a tutorial and review of the overall process of implementing



and using Perl5. Again, we will still assume that you're already familiar with the



basics of Perl programming. As of the writing of this introduction, the brand new



revision of Programming Perl (Wall, Christiansen, Schwartz - O'Reilly and Associates),



the comprehensive reference for Perl programmers, is available. There are other good



books, online tutorials, and other resources for those just starting out with Perl.</P>



<P>From what I can tell, however, there are a great number of people out there who



see Perl5 only as a means to an end. I can understand this position. Not everyone



can be a &quot;Perl junkie&quot; like me, and presumably, not everyone would want



to, either. Although I can't imagine why not. :-) Regardless, we aim to teach as



much of the Perl5 programming skills as are necessary to implement, use, and customize



the latest and coolest tools, tricks, and techniques which are described herein.</P>



<P>We'll also give serious consideration to the all-important security issues (one



can never stress this enough, and it will also comprise a full chapter) related to



providing a Web service. These issues have, of course, been considered in many previous



texts. In fact, any work which did not give consideration to these issues would be



lacking at best, and dangerous at worst. Most of the examples and discussion in the



security chapter will be implemented with Perl. On the other hand, we won't spend



a lot of time discussing other important aspects of security which have little or



nothing to do with Perl, like SSL (Secure Socket Layer) and what the little key at



the bottom of the Netscape browser means, for instance.</P>



<P>Once we're through with the Perl5 tutorial and security review, we'll move right



into the meat of the matter, and presumably, the reason you spent your money on this



book, the examples. We'll try to cover each technique with an eye towards the underlying



idea, or algorithm, behind it. What does it add to your Web, and the WWW in general,



that wasn't there before? How does it differ from the existing implementations, both



in Perl4, or in other languages? And what are the costs, if any, which you must absorb,



to implement it? Why did the implementor(s) of the tool or module feel that it was



important enough to spend their time in developing it?</P>



<P>We'll spend time covering CGI programming, of course. We'll also devote a full



section to the discussion of Archivists' issues in general, and especially as they



relate to maintaining a full multi-media archive which is dynamic and subject to



revisions, changes, and enhancements.</P>



<P>Finally, we'll close with coverage of some of what we feel to be the most exciting,



but also the least well developed and implemented, techniques and proposals for using



Perl with the Web. Many of you will be familiar with Java, of course, but how many



are aware that there is also a Perl5 interpreter available as a Netscape plugin?



This is, of course, strictly a proof-of-concept implementation at this point, but



it's exciting to think of the power and flexibility of having a Perl-code-aware browser.



Also discussed in these final chapters will be some of the more interesting proposals



for new features in the HTML/CGI language itself, which involve the implementation



of embedded functionality, and abstract it to a certain degree, to include just about



anything, including embedded Perl scripts.



<H4 ALIGN="CENTER"><A NAME="Heading5"></A><FONT COLOR="#000077">The Layout of This



Book</FONT></H4>



<P>So, a semi-formal description is probably in order at this point, of each of the



chapters that comprise this book. If you're just browsing this book, considering



the purchase, this might help you to decide whether or not to buy it. Alternatively,



you can refer back here at anytime for a short description of each of the chapters,



beyond what is said in the table of contents.







<UL>



	<LI><FONT COLOR="#0000AA">Chapter 1:</FONT> &quot;Introduction and Overview&quot;



	(this chapter): A short note from the authors regarding the usefulness and longevity



	of this book, an overview of what this book is and isn't, and an introduction to



	the CPAN, which is referred to throughout the rest of the book.



	<P>



	<LI><FONT COLOR="#0000AA">Chapter 2:</FONT> &quot;A Perl5 Overview and Tutorial&quot;:



	Short discussion on most of the new features in Perl5. Tutorial on the usage of the



	new OO features, and references in Perl programming.



	<P>



	<LI><FONT COLOR="#0000AA">Chapter 3:</FONT> &quot;Security on the Web&quot;: Every



	aspect of security we could think of, or find information on, including file permissions,



	CGI issues, access issues, and others.



	<P>



	<LI><FONT COLOR="#0000AA">Chapter 4:</FONT> &quot;HTML Forms--The Foundation of an



	Interactive Web&quot;: Generating dynamic HTML forms using the libwww modules, a



	review and tutorial.



	<P>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -