注冊(cè) | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁出版圖書科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件與程序設(shè)計(jì)網(wǎng)絡(luò)編程Intermediate Perl(影印版)

Intermediate Perl(影印版)

Intermediate Perl(影印版)

定 價(jià):¥48.00

作 者: (美)施瓦茨,(美)福格,(美)菲尼克斯 著
出版社: 東南大學(xué)出版社
叢編項(xiàng):
標(biāo) 簽: Perl

ISBN: 9787564112356 出版時(shí)間: 2008-08-01 包裝: 平裝
開本: 16開 頁數(shù): 256 字?jǐn)?shù):  

內(nèi)容簡(jiǎn)介

  從一個(gè)Perl愛好者到一個(gè)Perl程序員?!禝ntermediate Perl》將教您如何把Perl作為編程語言來使用,而不僅只是作為一種腳本語言。Perl是一種靈活多變、功能強(qiáng)大的編程語言,可以應(yīng)用在從系統(tǒng)管理到網(wǎng)絡(luò)編程再到數(shù)據(jù)庫(kù)操作等很多方面。人們常說Perl讓容易的事情變簡(jiǎn)單、讓困難的事情變得可行?!禝ntermediate Perl》正是關(guān)于如何將技能從處理簡(jiǎn)單任務(wù)躍升到勝任困難任務(wù)的書籍?!禝ntermediate Perl》提供對(duì)Perl中級(jí)編程優(yōu)雅而仔細(xì)的介紹。由暢銷的《學(xué)習(xí)Perl》作者所著,本書提供了《學(xué)習(xí)Perl》沒有涵蓋的內(nèi)容。主題包括:包和命名空間引用和作用域操作復(fù)雜數(shù)據(jù)結(jié)構(gòu)面向?qū)ο缶幊叹帉懞褪褂媚K測(cè)試Perl代碼為CPAN貢獻(xiàn)代碼參照《學(xué)習(xí)Perl》的成功編排格式,本書的每一章都短小到可以在一到兩個(gè)小時(shí)內(nèi)讀完,并在結(jié)束時(shí)提供一系列練習(xí)題幫助您實(shí)踐剛剛學(xué)到的知識(shí)。使用本書,您只需熟悉《學(xué)習(xí)Perl》的內(nèi)容并有更進(jìn)一步學(xué)習(xí)的決心。對(duì)于不同的人而言Perl是一種不同的語言。對(duì)于某些人而言,它只是快速編寫腳本的工具,但對(duì)于另外的人來說,它就是一種功能完整的面向?qū)ο笳Z言。Perl被應(yīng)用在各種任務(wù)當(dāng)中,從對(duì)文本文件進(jìn)行快速全局替換,到計(jì)算需要數(shù)星期才能完成處理的海量復(fù)雜科學(xué)數(shù)據(jù)。您的使用決定Perl的面貌。但不論您將Perl應(yīng)用在什么方面,本書將幫助您讓應(yīng)用更加有效、高效和優(yōu)雅?!禝ntermediate Perl》是為了把Perl作為一種編程語言來學(xué)習(xí),而不僅是為了寫腳本而著。這本書把Perl愛好者變?yōu)镻erl程序員。

作者簡(jiǎn)介

暫缺《Intermediate Perl(影印版)》作者簡(jiǎn)介

圖書目錄

Foreword . xiii
Preface xv
1. Introduction 1
What Should You Know Already? 2
What About All Those Footnotes? 2
What’s with the Exercises? 2
What If I’m a Perl Course Instructor? 3
2. Intermediate Foundations 4
List Operators 4
Trapping Errors with eval 8
Dynamic Code with eval 9
Exercises 10
3. Using Modules 11
The Standard Distribution 11
Using Modules 12
Functional Interfaces 12
Selecting What to Import 13
Object-Oriented Interfaces 14
A More Typical Object-Oriented Module: Math::BigInt 15
The Comprehensive Perl Archive Network 15
Installing Modules from CPAN 16
Setting the Path at the Right Time 17
Exercises 19
4. Introduction to References 21
Performing the Same Task on Many Arrays 21
Taking a Reference to an Array 23
Dereferencing the Array Reference 24
Getting Our Braces Off 26
Modifying the Array 26
Nested Data Structures 27
Simplifying Nested Element References with Arrows 29
References to Hashes 30
Exercises 32
5. References and Scoping34
More Than One Reference to Data 34
What If That Was the Name? 35
Reference Counting and Nested Data Structures 36
When Reference Counting Goes Bad 38
Creating an Anonymous Array Directly 40
Creating an Anonymous Hash 42
Autovivification 44
Autovivification and Hashes 47
Exercises 48
6. Manipulating Complex Data Structures 50
Using the Debugger to View Complex Data 50
Viewing Complex Data with Data::Dumper 54
YAML 56
Storing Complex Data with Storable 57
Using the map and grep Operators 59
Applying a Bit of Indirection 59
Selecting and Altering Complex Data 60
Exercises 62
7. Subroutine References63
Referencing a Named Subroutine 63
Anonymous Subroutines 68
Callbacks 70
Closures 70
Returning a Subroutine from a Subroutine 72
Closure Variables as Inputs 75
Closure Variables as Static Local Variables 75
Exercise 77
8. Filehandle References. 79
The Old Way 79
The Improved Way 80
The Even Better Way 81
IO::Handle 82
Directory Handle References 86
Exercises 87
9. Practical Reference Tricks 89
Review of Sorting 89
Sorting with Indices 91
Sorting Efficiently 92
The Schwartzian Multi-Level Sort with the Recursively Defined ata 95
Building Recursively Defined Data 96
Displaying Recursively Defined Data 98
Exercises 99
10. Building Larger Programs 101
The Cure for the Common Code 101
Inserting Code with eval 102
Using do 103
Using require 105
require and @INC 106
The Problem of Namespace Collisions 109
Packages as Namespace Separators 110
Scope of a Package Directive 112
Packages and Lexicals 113
Exercises 113
11. Introduction to Objects115
If We Could Talk to the Animals... 115
Introducing the Method Invocation Arrow 117
The Extra Parameter of Method Invocation 118
Calling a Second Method to Simplify Things 119
A Few Notes About @ISA 120
Overriding the Methods 121
Starting the Search from a Different Place 123
The SUPER Way of Doing Things 124
What to Do with @_ 124
Where We Are So Far... 124
Exercises 125
12. Objects with Data 126
A Horse Is a Horse, of Course of Course—or Is It? 126
Invoking an Instance Method 127
Accessing the Instance Data 128
How to Build a Horse 128
Inheriting the Constructor 129
Making a Method Work with Either Classes or Instances ..130
Adding Parameters to a Method 131
More Interesting Instances 132
A Horse of a Different Color 133
Getting Our Deposit Back 133
Don’t Look Inside the Box 135
Faster Getters and Setters 136
Getters That Double as Setters 136
Restricting a Method to Class-Only or Instance-Only 137
Exercise 137
13. Object Destruction 139
Cleaning Up After Yourself 139
Nested Object Destruction 141
Beating a Dead Horse 144
Indirect Object Notation 145
Additional Instance Variables in Subclasses 147
Using Class Variables 149
Weakening the Argument 150
Exercise 152
14. Some Advanced Object Topics 154
UNIVERSAL Methods 154
Testing Our Objects for Good Behavior 155
AUTOLOAD as a Last Resort 156
Using AUTOLOAD for Accessors 157
Creating Getters and Setters More Easily 158
Multiple Inheritance 160
Exercises 161
15. Exporter 162
What use Is Doing 162
Importing with Exporter 163
@EXPORT and @EXPORT_OK 164
%EXPORT_TAGS 165
xporting in a Primarily OO Module 166
Custom Import Routines 168
Exercises 169
16. Writing a Distribution171
There’s More Than One Way To Do It 172
Using h2xs 173
Embedded Documentation 179
Controlling the Distribution with Makefile.PL 183
Alternate Installation Locations (PREFIX=...) 184
Trivial make test 185
Trivial make install 186
Trivial make dist 186
Using the Alternate Library Location 187
Exercise 188
17. Essential Testing 189
More Tests Mean Better Code 189
A Simple Test Script 190
The Art of Testing 191
The Test Harness 193
Writing Tests with Test::More 195
Testing Object-Oriented Features 197
A Testing To-Do List 199
Skipping Tests 200
More Complex Tests (Multiple Test Scripts) 201
Exercise 201
18. Advanced Testing . 203
Testing Large Strings 203
Testing Files 204
Testing STDOUT or STDERR 205
Using Mock Objects 208
Testing POD 209
Coverage Testing 210
Writing Your Own Test::* Modules 211
Exercises 214
19. Contributing to CPAN. 216
The Comprehensive Perl Archive Network 216
Getting Prepared 216
Preparing Your Distribution 217
Uploading Your Distribution 218
Announcing the Module 219
Testing on Multiple Platforms 219
Consider Writing an Article or Giving a Talk 220
Exercise 220
Appendix: Answers to Exercises 221
Index ... 249

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)