精通Perl(英文影印版)
基本信息
- 原书名: Mastering perl
- 原出版社: O'Reilly Media, Inc.
- 作者: brian d foy [作译者介绍]
- 丛书名: 东南大学出版社O'REILLY图书系列
- 出版社:东南大学出版社
- ISBN:9787564110376
- 上架时间:2008-2-25
- 出版日期:2008 年2月
- 开本:16开
- 页码:322
- 版次:1-1
- 所属分类:
计算机 > 软件与程序设计 > 网络编程 > perl
编辑推荐
本书是O'Reilly具有标杆意义的Perl指南系列丛书的第三本,由浅入深地剖析了Perl特殊模块的工作机理、细致详尽地阐述了惯用的Perl编程思想和技术,这些知识必将能协助你开发 Perl程序时游刃有余,达成所需。
内容简介回到顶部↑
本书是0’reilly具有里程碑意义的perl教科书系列的第三本,该系列包括《learningperl》(最为畅销的一本介绍perl基础语法的书,简体中文版由东南大学出版社出版)、《intermediate perl》(一本perl程序员必备的指导如何创建可重用的perl软件的书)和《精通perl》。《精通perl》由浅入深地剖析了perl特殊模块的工作机理、细致详尽地阐述了惯用的perl 编程思想和技术,这些知识必能协助你在开发perl程序时游刃有余,达成所需。
本书并非一堆奇技的简单集合,而是着重介绍perl编程的思维方式,这是每一个合格的程序员都应当掌握的,并且应当借此解决实际生活中各式问题,如调试代码、维护程序以及配置等。本书解释了该如何:使用高级正则表达式,包括全局匹配、前后查询匹配、可读的正则表达式以及对正则表达式的调试;使用安全可靠的编程技术,避免常见的编程问题;剖析perl运行时数据并作基准测试,继而有针对性地进行性能优化;重新组织perl代码,使其更具自我表达力,增强可读性;查看perl如何实现对包变量的跟踪维护,你可以用类似的技巧玩出更多有用的花样来;动态定义子程序,从容化解普通过程式编程带来的劣势;临时修改或调整相关的模块,在不修改源代码的情况下修复代码存在的问题;在不触及代码的情况下,让用户自行对程序进行配置;侦测perl没有报告的那些错误并向用户汇报;应用log4perl模块,从perl程序的运行日志获取有价值的信息;存储相关数据以便后续再次运行该程序或其他程序时可以访问该数据,以及如何通过网络发送数据以perl模块的形式编写应用程序,以便使用现成的测试工具并轻松发布。
本书将带你一路揭示这些问题的答案,让你从容地成为能够发现并解决疑难杂症的专家。
本书并非一堆奇技的简单集合,而是着重介绍perl编程的思维方式,这是每一个合格的程序员都应当掌握的,并且应当借此解决实际生活中各式问题,如调试代码、维护程序以及配置等。本书解释了该如何:使用高级正则表达式,包括全局匹配、前后查询匹配、可读的正则表达式以及对正则表达式的调试;使用安全可靠的编程技术,避免常见的编程问题;剖析perl运行时数据并作基准测试,继而有针对性地进行性能优化;重新组织perl代码,使其更具自我表达力,增强可读性;查看perl如何实现对包变量的跟踪维护,你可以用类似的技巧玩出更多有用的花样来;动态定义子程序,从容化解普通过程式编程带来的劣势;临时修改或调整相关的模块,在不修改源代码的情况下修复代码存在的问题;在不触及代码的情况下,让用户自行对程序进行配置;侦测perl没有报告的那些错误并向用户汇报;应用log4perl模块,从perl程序的运行日志获取有价值的信息;存储相关数据以便后续再次运行该程序或其他程序时可以访问该数据,以及如何通过网络发送数据以perl模块的形式编写应用程序,以便使用现成的测试工具并轻松发布。
本书将带你一路揭示这些问题的答案,让你从容地成为能够发现并解决疑难杂症的专家。
作译者回到顶部↑
本书提供作译者介绍
brian d foy是stonehenge Consulting Services公司的顾问,也是The Perl Review杂志的出版者。他所创立的非营利性公司Perl Mongers,Inc.,已经在全球范围内帮助筹建了200多个Perl用户组。brian还维护着核心Perl文档中的perlfaq部分,以及众多发布到CPAN的模块。他还是Perl大会的演讲常客,也是0’Reilly Network、The Perl Journal杂志、Dr.Dobbs杂志、use.perl.org站点和许多Perl Usenet新闻组的积极贡献者。
.. << 查看详细
.. << 查看详细
目录回到顶部↑
foreword
preface
1. introduction: becoming a master
what it means to be a master
who should read this book
how to read this book
what should you know already?
what i cover
what i don't cover
2. advanced regular expressions
references to regular expressions
noncapturing grouping, (?:pattern)
readable regexes,/x and (?#...)
global matching
lookarounds
deciphering regular expressions
final thoughts
summary
further reading
3. secure programming techniques
preface
1. introduction: becoming a master
what it means to be a master
who should read this book
how to read this book
what should you know already?
what i cover
what i don't cover
2. advanced regular expressions
references to regular expressions
noncapturing grouping, (?:pattern)
readable regexes,/x and (?#...)
global matching
lookarounds
deciphering regular expressions
final thoughts
summary
further reading
3. secure programming techniques
前言回到顶部↑
Mastering Perl is the third book in the series starting with Learning Perl, which taught you the basics of Perl syntax, progressing to Intermediate Perl, which taught you how to create reusable Perl software, and finally this book, which pulls everything together to show you how to bend Perl to your will. This isn't a collection of clever tricks, but a way of thinking about Perl programming so you integrate the real-life problems of debugging, maintenance, configuration, and other tasks you'll encounter as a working programmer. This book starts you on your path to becoming the person with the answers, and, failing that, the person who knows how to find the answers or discover the problem. .
Structure of This Book
Chapter 1, Introduction: Becoming a Master
An introduction to the scope and intent of this book.
Chapter 2, Advanced Regular Expressions
More regular expression features, including global matches, lookarounds, readable regexes, and regex debugging.
Chapter 3, Secure Programming Techniques
Avoid some common programing problems with the techniques in this chapter, which covers taint checking and gotchas.
Chapter 4, Debugging Perl
A little bit about the Perl debugger, writing your own debugger, and using the debuggers others wrote.
Chapter 5, Profiling Perl
Before you set out to improve your Perl program, find out where you should concentrate your efforts.
Chapter 6, Benchmarking Perl
Figure out which implementations do better on time, memory, and other metrics, along with cautions about what your numbers actually mean.
Chapter 7, Cleaning Up Perl
Wrangle Peri code you didn't write (or even code you did write) to make it more presentable and readable by using peri::Tidy or Peri: :Critic.
Chapter 8, Symbol Tables and Typeglobs
Learn how Peri keeps track of package variables and how you can use that mechanism for some powerful Peri tricks.
Chapter 9, Dynamic Subroutines
Define subroutines on the fly and turn the tables on normal procedural programming. Iterate through subroutine lists rather than data to make your code more effective and easy to maintain. ..
Structure of This Book
Chapter 1, Introduction: Becoming a Master
An introduction to the scope and intent of this book.
Chapter 2, Advanced Regular Expressions
More regular expression features, including global matches, lookarounds, readable regexes, and regex debugging.
Chapter 3, Secure Programming Techniques
Avoid some common programing problems with the techniques in this chapter, which covers taint checking and gotchas.
Chapter 4, Debugging Perl
A little bit about the Perl debugger, writing your own debugger, and using the debuggers others wrote.
Chapter 5, Profiling Perl
Before you set out to improve your Perl program, find out where you should concentrate your efforts.
Chapter 6, Benchmarking Perl
Figure out which implementations do better on time, memory, and other metrics, along with cautions about what your numbers actually mean.
Chapter 7, Cleaning Up Perl
Wrangle Peri code you didn't write (or even code you did write) to make it more presentable and readable by using peri::Tidy or Peri: :Critic.
Chapter 8, Symbol Tables and Typeglobs
Learn how Peri keeps track of package variables and how you can use that mechanism for some powerful Peri tricks.
Chapter 9, Dynamic Subroutines
Define subroutines on the fly and turn the tables on normal procedural programming. Iterate through subroutine lists rather than data to make your code more effective and easy to maintain. ..
序言回到顶部↑
One of the problems we face at Stonehenge as professional trainers is to make sure that we write materials that are reusable in more than one presentation. The development expense of a given set of lecture notes requires us to consider that we’ll need roughly two to four hundred people who are all starting in roughly the same place, and who want to end up in the same place, and who we can find in a billable situation. .
With our flagship product, the Learning Perl course, the selection of topics was easy: pick all the things that nearly everyone will need to know to write single-file scripts across the broad range of applications suited for Perl, and that we can teach in the first week of classroom exposure.
When choosing the topics for Intermediate Perl, we faced a slightly more difficult challenge,because the “obvious” path is far less obvious. We concluded that in the second classroom week of exposure to Perl, people will want to know what it takes to write complex data structures and objects, and work in groups (modules, testing, and distributions). Again, we seemed to have hit the nail on the head, as the course and book are very popular as well. ..
Fresh after having updated our Learning Perl and Intermediate Perl books, brian d foy realized that there was still more to say about Perl just beyond the reach of these two tutorials, although not necessarily an “all things for all people” approach.
In Mastering Perl, brian has captured a number of interesting topics and written them down with lots of examples, all in fairly independently organized chapters. You may not find everything relevant to your particular coding, but this book can be picked up and set back down again as you find time and motivation—a luxury that we can’t afford in a classroom. While you won’t have the benefit of our careful in-person elaborations and interactions, brian does a great job of making the topics approachable and complete.
And oddly enough, even though I’ve been programming Perl for almost two decades, I learned a thing or two going through this book, so brian has really done his homework.I hope you find the book as enjoyable to read as I have.
—Randal L. Schwartz ...
With our flagship product, the Learning Perl course, the selection of topics was easy: pick all the things that nearly everyone will need to know to write single-file scripts across the broad range of applications suited for Perl, and that we can teach in the first week of classroom exposure.
When choosing the topics for Intermediate Perl, we faced a slightly more difficult challenge,because the “obvious” path is far less obvious. We concluded that in the second classroom week of exposure to Perl, people will want to know what it takes to write complex data structures and objects, and work in groups (modules, testing, and distributions). Again, we seemed to have hit the nail on the head, as the course and book are very popular as well. ..
Fresh after having updated our Learning Perl and Intermediate Perl books, brian d foy realized that there was still more to say about Perl just beyond the reach of these two tutorials, although not necessarily an “all things for all people” approach.
In Mastering Perl, brian has captured a number of interesting topics and written them down with lots of examples, all in fairly independently organized chapters. You may not find everything relevant to your particular coding, but this book can be picked up and set back down again as you find time and motivation—a luxury that we can’t afford in a classroom. While you won’t have the benefit of our careful in-person elaborations and interactions, brian does a great job of making the topics approachable and complete.
And oddly enough, even though I’ve been programming Perl for almost two decades, I learned a thing or two going through this book, so brian has really done his homework.I hope you find the book as enjoyable to read as I have.
—Randal L. Schwartz ...
书摘回到顶部↑
CHAPTER 1 Introduction: Becoming a Master .
This book isn't going to make you a Peri master; you have to do that for yourself by programming a lot of Peri, trying a lot of new things, and making a lot of mistakes. I'm going to help you get on the right path. The road to mastery is one of self-reliance and independence. As a Peri master, you'll be able to answer your own questions as well as those of others.
In the golden age of guilds, craftsmen followed a certain path, both literally and figuratively, as they mastered their craft. They started as apprentices and would do the boring bits of work until they had enough skill to become the more trusted journeymen. The journeyman had greater responsibility but still worked under a recognized master. When he had learned enough of the craft, the journeyman would produce a "master work" to prove his skill. If other masters deemed it adequately masterful, the journeyman became a recognized master himself. ..
The journeymen and masters also traveled (although people disagree on whether that's where the "journey" part of the name came from) to other masters, where they would learn new techniques and skills. Each master knew things the others didn't, perhaps deliberately guarding secret methods, or knew it in a different way. Part of a journeyman's education was learning from more than one master.
Interactions with other masters and journeymen continued the master's education. He learned from those masters with more experience and learned from himself as he taught journeymen, who also taught him because they brought skills they learned from other masters.
The path an apprentice followed affected what he learned. An apprentice who studied with more masters was exposed to many more perspectives and ways of teaching, all of which he could roll into his own way of doing things. Odd teachings from one master could be exposed by another, giving the apprentice a balanced view on things. Additionally, although the apprentice might be studying to be a carpenter or a mason, different masters applied those skills to different goals, giving the apprentice a chance to learn different applications and ways of doing things. ...
This book isn't going to make you a Peri master; you have to do that for yourself by programming a lot of Peri, trying a lot of new things, and making a lot of mistakes. I'm going to help you get on the right path. The road to mastery is one of self-reliance and independence. As a Peri master, you'll be able to answer your own questions as well as those of others.
In the golden age of guilds, craftsmen followed a certain path, both literally and figuratively, as they mastered their craft. They started as apprentices and would do the boring bits of work until they had enough skill to become the more trusted journeymen. The journeyman had greater responsibility but still worked under a recognized master. When he had learned enough of the craft, the journeyman would produce a "master work" to prove his skill. If other masters deemed it adequately masterful, the journeyman became a recognized master himself. ..
The journeymen and masters also traveled (although people disagree on whether that's where the "journey" part of the name came from) to other masters, where they would learn new techniques and skills. Each master knew things the others didn't, perhaps deliberately guarding secret methods, or knew it in a different way. Part of a journeyman's education was learning from more than one master.
Interactions with other masters and journeymen continued the master's education. He learned from those masters with more experience and learned from himself as he taught journeymen, who also taught him because they brought skills they learned from other masters.
The path an apprentice followed affected what he learned. An apprentice who studied with more masters was exposed to many more perspectives and ways of teaching, all of which he could roll into his own way of doing things. Odd teachings from one master could be exposed by another, giving the apprentice a balanced view on things. Additionally, although the apprentice might be studying to be a carpenter or a mason, different masters applied those skills to different goals, giving the apprentice a chance to learn different applications and ways of doing things. ...








点击看大图





加载中...


