• Complain

Martin C. Brown - Debugging Perl: Troubleshooting for Programmers

Here you can read online Martin C. Brown - Debugging Perl: Troubleshooting for Programmers full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2000, publisher: Computing McGraw-Hill, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Martin C. Brown Debugging Perl: Troubleshooting for Programmers
  • Book:
    Debugging Perl: Troubleshooting for Programmers
  • Author:
  • Publisher:
    Computing McGraw-Hill
  • Genre:
  • Year:
    2000
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Debugging Perl: Troubleshooting for Programmers: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Debugging Perl: Troubleshooting for Programmers" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Offers advice on error prevention, troubleshooting, and preventive maintenance, covering Perl logic, variable problems, error trapping, manual debugging, automatic and manual optimization, and code testing.

Martin C. Brown: author's other books


Who wrote Debugging Perl: Troubleshooting for Programmers? Find out the surname, the name of the author of the book and a list of all author's works by series.

Debugging Perl: Troubleshooting for Programmers — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Debugging Perl: Troubleshooting for Programmers" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
This book made available by the Internet Archive - photo 1

This book made available by the Internet Archive.

Debugging Perl Troubleshooting for Programmers - photo 2
To Oscar who provided comfort - photo 3
To Oscar who provided comfort when I wanted it and useful distractions to the - photo 4
To Oscar who provided comfort when I wanted it and useful distractions to the - photo 5
To Oscar who provided comfort when I wanted it and useful distractions to the - photo 6

To Oscar, who provided comfort when I wanted it and useful distractions to the vet when I didn't.

Digitized by the Internet Archive in 2014

https://archive.org/details/debuggingperlOOmart

viii Debugging Perl Troubleshooting for Programmers Chapter 14 Breaking Your - photo 7

viii Debugging Perl: Troubleshooting for Programmers

Chapter 14 Breaking Your Code 319

Part VI Appendix

Appendix A Error Message Cross Reference 341

Index 405

Table of Contents

Acknowledgments, xvii Introduction, xix

Part I Introduction to Perl Debugging

Chapter 1 Introduction 3

Bug Types 5

The Typographical Bug 5

The Logic Bug 6

The Execution Bug 7

Basic Perl Debugging Rules 8

Bug Prevention 9

Program Design 9

Editors 10

Formatting 10

Comments 11

Code Revisions 12

Part II Perl Logic and Syntax

Chapter 2 Basic Perl Parsing Rules and Traps 17

The Execution Process 18

Architecture 19

Internal Objects 20

Translator 21

Opcodes 21

Compilation 24

Execution 26

Execution Summary 27

Syntax and Parsing Rules 27

Basic Syntax 28

Comments 29

Component Identity 30

Precedence 31

Barewords 44

X Debugging Perl: Troubleshooting for Programmers

Contexts 45

Logical Values 46

Chapter 3 Common Variable Traps 49

Creating/Using Variables 50

Scalars 51

Arrays 51

Hashes 54

Lists 57

Filehandles 57

Use of defined 57

Default Values 58

Variable Scope 58

Effects of my 58

Effects of local 59

Effects of our 60

Special Variables 60

The @_ Array 60

The $_ Scalar 61

The $a and $b Scalars 62

The $1..$9 and other Regex Variables 63

References 63

Scalars 63

Arrays 64

Hashes 64

Functions 65

Globs 66

Nested Structures 66

Reference Types 67

Objects 68

Constants, Quotes, and Interpolation 69

Quoting Operators 69

'Here' Documents 70

Variable and String Interpolation 70

Chapter 4 Statement and Function Traps 73

Tests and Comparisons 74

Loops 74

Using while 75

The do {} while loop 75

The for and foreach loops 75

Control Statements 76

Regular Expression Traps 77

Function Traps 78

Contents X i

alarm 85

binmode 85

chdir 86

chomp 86

(hop 86

chown 86

crypt 86

delete 87

each 87

eval 87

exec 87

exists 88

exit 88

fork 88

gmtime/localtime 88

join 88

keys/values 89

map 89

open 90

print 90

sprintf 90

ref 91

scalar 91

seek 91

select (filehandle) 91

select (files) 91

shift and unshift/pop and push 92

Chapter 5 Program Design 95

Abstraction 96

Developing Good Subroutines 97

Parsing Arguments 98

Developing Good Modules 102

Developing Good Classes 104

Time-Saving Tricks 105

Prototypes 106

Dispatch Tables 109

References Ill

Comments and Documentation 113

Writing Comments 113

Writing Documentation 114

xii Debugging Perl: Troubleshooting for Progrommers

Chapter 6 Language/Platform Migration Guide 119

Language Migration Traps 120

Differences from awk/gawk 120

C Traps 122

sed Traps 123

emacs Traps 124

Shellscript Traps 124

Python Traps 125

Platform Migration Traps 127

Function Support 127

Constant Compatibility 127

Execution Environment 128

Errors 128

Line Termination 128

Character Sets 129

Data Differences 129

Files and Pathnames 130

Modules 130

Performance and Resources 130

Platform Migration Tricks 131

Port III Error Trapping

Chapter 7 Basic Error Trapping 137

Why Check for Errors? 138

Adding Error Checking to Your Scripts 139

Error Checking Guidelines 140

Error Checking Walkthrough 141

What to Check 144

What Not to Check 144

Don't Check Things that Don't Matter 145

User Input 145

Substitution/Transiiteration 145

When to Stop Checking 146

Don't Check Things Twice 146

Functions, Return Values, and Nesting 147

Error Messages and Numbers 148

Reporting Errors Within Scripts 149

The Warn Function 150

The Die Function 150

Propagation and eval 150

Directives and Tokens 152

Reporting Errors Within Modules 152

The Carp Function 154

Contents x iii

The Cluck Function 154

The Croak Function 154

The Confess Function 154

Reporting Errors Within GUIs and Web Applications 155

Tk Dialogues 155

Web Error Reporting 157

Chapter 8 Using Pragmas and Warnings 161

Warnings 162

The $ A W Variable 163

The Old warnings Pragma 164

Lexical Warnings in Perl 5.6 164

The strict Pragma 168

The vars Option 169

The refs Option 171

The subs Option 172

Other Perl Pragmas 172

autouse 173

base 174

blib 174

constant 175

diagnostics 176

fields 177

integer 178

less 179

lib 179

ops 180

re 180

sigtrap 181

subs 182

vars 182

Chapter 9 Manual Debugging Techniques 185

Using print 186

Quoting Information 187

Tracing Execution 188

Using a Debug Option 189

Using caller 190

Using eval 193

Signals 195

Signals as Exceptions 196

The WARN and DIE Signals 196

Writing a Log 199

Redirecting STDOUT/STDERR 199

Using a Logging Function 200

xiv Debugging Perl: Troubleshooting for Programmers

Reporting to syslog 201

Reporting to the Windows NT/2000 Event Log 203

Chapter 10 The Perl Debuggers 207

Using a Debugger 208

Watches 208

Stepping 209

Breakpoints 209

The Perl Debugger 209

The User Interface 210

Debugger Commands 211

Using Non-Interactive Mode 221

Customization 222

Alternative Interfaces 222

ActivePerl Debugger 223

The Debugger Interface 224

The Registers 227

Proximity Panel 228

Watches 229

Executing Statements 229

Debug Tools 230

Bookmarks 233

Using Tools 233

Command-Line Debugging 235

Tokenizing and Parsing 237

Stack Snapshots 238

Context (Loop) Stack Processing 239

Trace Execution 240

Method and Overloading Resolution 241

String/Numeric Conversions 242

Print Preprocessor (for CPP) 243

Memory Allocation 243

Format Processing 244

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Debugging Perl: Troubleshooting for Programmers»

Look at similar books to Debugging Perl: Troubleshooting for Programmers. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Debugging Perl: Troubleshooting for Programmers»

Discussion, reviews of the book Debugging Perl: Troubleshooting for Programmers and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.