Perl best practices:
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Beijing ; Cambridge ; Farnham ; Köln
O'Reilly
2005
|
Ausgabe: | First edition |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | xxii, 517 Seiten Diagramme |
ISBN: | 0596001738 9780596001735 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV020873821 | ||
003 | DE-604 | ||
005 | 20220830 | ||
007 | t | ||
008 | 051117s2005 |||| |||| 00||| eng d | ||
015 | |a 05,N36,0033 |2 dnb | ||
016 | 7 | |a 976028999 |2 DE-101 | |
020 | |a 0596001738 |c : EUR 38.00 |9 0-596-00173-8 | ||
020 | |a 9780596001735 |9 978-0-596-00173-5 | ||
024 | 3 | |a 9780596001735 | |
035 | |a (OCoLC)883589788 | ||
035 | |a (DE-599)BVBBV020873821 | ||
040 | |a DE-604 |b ger |e rda | ||
041 | 0 | |a eng | |
049 | |a DE-29T |a DE-1051 |a DE-573 |a DE-706 |a DE-355 |a DE-19 |a DE-188 |a DE-M100 | ||
080 | |a 004.42 | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a 004 |2 sdnb | ||
100 | 1 | |a Conway, Damian |e Verfasser |4 aut | |
245 | 1 | 0 | |a Perl best practices |c Damian Conway |
250 | |a First edition | ||
264 | 1 | |a Beijing ; Cambridge ; Farnham ; Köln |b O'Reilly |c 2005 | |
300 | |a xxii, 517 Seiten |b Diagramme | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
650 | 0 | 7 | |a Perl |g Programmiersprache |0 (DE-588)4307836-9 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Perl |g Programmiersprache |0 (DE-588)4307836-9 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m Digitalisierung UB Regensburg - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=014195528&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-014195528 |
Datensatz im Suchindex
_version_ | 1804134601658990592 |
---|---|
adam_text | Table of Contents Preface ............. 1. Best Practices............................................................................................ Three Goals This Book Rehabiting xv 1 3 5 7 2. Code Layout.................................................................................................. 8 Bracketing 9 Keywords 11 Subroutines and Variables 12 Builtins 13 Keys and Indices 14 Operators 14 Semicolons 15 Commas 17 Line Lengths 18 Indentation 19 Tabs 20 Blocks 22 Chunking 23 Eises 24 Vertical Alignment 26 Breaking Long Lines 27 Non-Terminal Expressions 29 Breaking by Precedence 29 Assignments 30 v
Ternaries Lists Automated Layout 31 32 33 Naming Conventions....................................... ................................. 36 Identifiers Booleans Reference Variables Arrays and Hashes Underscores Capitalization Abbreviations Ambiguous Abbreviations Ambiguous Names Utility Subroutines 37 40 41 43 44 45 46 47 48 49 Values and Expressions.................................... ................................. 51 String Delimiters Empty Strings Single-Character Strings Escaped Characters Constants Leading Zeros Long Numbers Multiline Strings Here Documents Heredoc Indentation Heredoc Terminators Heredoc Quoters Barewords Fat Commas Thin Commas Low-Precedence Operators Lists List Membership 51 53 53 54 55 58 59 60 61 61 62 64 65 66 68 70 71 71 Variables ...................................................... ................................. 73 Lexical Variables Package Variables vi ļ Table of Contents 73 75
Localization Initialization Punctuation Variables Localizing Punctuation Variables Match Variables Dollar-Underscore Array Indices Slicing Slice Layout Slice Factoring 6. 77 78 79 81 82 85 88 89 90 90 Control Structures .......................................................... ....................................... 93 If Blocks Postfix Selectors Other Postfix Modifiers Negative Control Statements С-Style Loops Unnecessary Subscripting Necessary Subscripting Iterator Variables Non-Lexical Loop Iterators List Generation List Selections List Transformation Complex Mappings List Processing Side Effects Multipart Selections Value Switches Tabular Ternaries do-while Loops Linear Coding Distributed Control Redoing Loop Labels 7. 93 94 96 97 100 101 103 105 108 110 111 112 113 114 117 118 121 123 125 126 128 129 Documentation ............................................................... ..................................... 132 Types of Documentation Boilerplates Extended Boilerplates 132 133 138 Table of Contents | vii
Location Contiguity Position Technical Documentation Comments Algorithmic Documentation Elucidating Documentation Defensive Documentation Indicative Documentation Discursive Documentation Proofreading 139 140 140 141 141 142 143 144 145 145 148 Built-in Functions . :................................................... ................................... 149 Sorting Reversing Lists Reversing Scalars Fixed-Width Data Separated Data Variable-Width Data String Evaluations Automating Sorts Substrings Hash Values Globbing Sleeping Mapping and Grepping Utilities 149 152 153 154 157 158 161 164 165 166 167 168 169 170 Subroutines.................................................................. ................................... 175 Call Syntax Homonyms Argument Lists Named Arguments Missing Arguments Default Argument Values Scalar Return Values Contextual Return Values Multi-Contextual Return Values Prototypes viii ( Table of Contents 175 177 178 182 184 185 186 188 191 194
Implicit Returns Returning Failure 10. I/O............................................................................... .................................... 202 Filehandles Indirect Filehandles Localizing Filehandles Opening Cleanly Error Checking Cleanup Input Loops Line-Based Input Simple Slurping Power Slurping Standard Input Printing to Filehandles Simple Prompting Interactivity Power Prompting Progress Indicators Automatic Progress Indicators Autoflushing 11. 197 199 202 204 205 207 208 209 211 212 213 214 216 217 217 218 220 222 224 224 References.................................................................. ...................................... 227 227 228 230 232 Dereferencing Braced References Symbolic References Cyclic References 12. Regular Expressions................................................... .................................. 235 236 237 239 240 240 242 242 246 247 Extended Formatting Line Boundaries String Boundaries End of String Matching Anything Lazy Flags Brace Delimiters Other Delimiters Metacharacters Table of Contents | ix
Named Characters Properties Whitespace Unconstrained Repetitions Capturing Parentheses Captured Values Capture Variables Piecewise Matching Tabular Regexes Constructing Regexes Canned Regexes Alternations Factoring Alternations Backtracking String Comparisons 13. Error Handling ................................................................................................. 273 Exceptions Builtin Failures Contextual Failure Systemic Failure Recoverable Failure Reporting Failure Error Messages Documenting Errors OO Exceptions Volatile Error Messages Exception Hierarchies Processing Exceptions Exception Classes Unpacking Exceptions 14. I 274 278 279 280 281 283 284 286 287 290 291 292 293 296 Command-Line Processing.............................................................................. 299 Command-Line Structure Command-Line Conventions Meta-options In-situ Arguments Command-Line Processing x 247 248 249 250 252 253 254 257 259 261 263 265 266 269 271 Table of Contents 300 301 303 304 306
Interface Consistency Interapplication Consistency 311 314 15. Objects........................................................... .............................. 318 Using OO Criteria Pseudohashes Restricted Hashes Encapsulation Constructors Cloning Destructors Methods Accessors Lvalue Accessors Indirect Objects Class Interfaces Operator Overloading Coercions 319 320 322 322 323 333 334 336 338 340 346 349 351 354 356 16. Class Hierarchies.............................................. ............................... 359 Inheritance Objects Blessing Objects Constructor Arguments Base Class Initialization Construction and Destruction Automating Class Hierarchies Attribute Demolition Attribute Building Coercions Cumulative Methods Autoloading 360 361 365 367 371 376 383 384 387 388 389 393 17. Modules......................................................... ............................... 397 397 401 404 405 Interfaces Refactoring Version Numbers Version Requirements Table of Contents | xi
Exporting Declarative Exporting Interface Variables Creating Modules The Standard Library CPAN 18. Testing and Debugging............................................ ...................................... 420 TestCases Modular Testing Test Suites Failure What to Test Debugging and Testing Strictures Warnings Correctness Overriding Strictures The Debugger Manual Debugging Semi-Automatic Debugging 19. I 420 421 424 425 426 427 429 431 432 433 436 437 439 Miscellanea....................................................................................................... 441 Revision Control Other Languages Configuration Files Formats Ties Cleverness Encapsulated Cleverness Benchmarking Memory Caching Memoization Caching for Optimization Profiling Enbugging xii 407 409 411 415 417 418 Table of Contents 441 442 445 449 451 453 454 456 459 460 462 463 464 466
A. Essential Perl Best Practices............................................................. 469 B. Perl Best Practices.......................................................................... 472 C. Editor Configurations ..................................................................... 482 D. Recommended Modules and Utilities ................................................ 487 E. Bibliography.................................................................................. 493 Index..................................................................................................... 495 Table of Contents | xiii
|
adam_txt |
Table of Contents Preface . 1. Best Practices. Three Goals This Book Rehabiting xv 1 3 5 7 2. Code Layout. 8 Bracketing 9 Keywords 11 Subroutines and Variables 12 Builtins 13 Keys and Indices 14 Operators 14 Semicolons 15 Commas 17 Line Lengths 18 Indentation 19 Tabs 20 Blocks 22 Chunking 23 Eises 24 Vertical Alignment 26 Breaking Long Lines 27 Non-Terminal Expressions 29 Breaking by Precedence 29 Assignments 30 v
Ternaries Lists Automated Layout 31 32 33 Naming Conventions. . 36 Identifiers Booleans Reference Variables Arrays and Hashes Underscores Capitalization Abbreviations Ambiguous Abbreviations Ambiguous Names Utility Subroutines 37 40 41 43 44 45 46 47 48 49 Values and Expressions. . 51 String Delimiters Empty Strings Single-Character Strings Escaped Characters Constants Leading Zeros Long Numbers Multiline Strings Here Documents Heredoc Indentation Heredoc Terminators Heredoc Quoters Barewords Fat Commas Thin Commas Low-Precedence Operators Lists List Membership 51 53 53 54 55 58 59 60 61 61 62 64 65 66 68 70 71 71 Variables . . 73 Lexical Variables Package Variables vi ļ Table of Contents 73 75
Localization Initialization Punctuation Variables Localizing Punctuation Variables Match Variables Dollar-Underscore Array Indices Slicing Slice Layout Slice Factoring 6. 77 78 79 81 82 85 88 89 90 90 Control Structures . . 93 If Blocks Postfix Selectors Other Postfix Modifiers Negative Control Statements С-Style Loops Unnecessary Subscripting Necessary Subscripting Iterator Variables Non-Lexical Loop Iterators List Generation List Selections List Transformation Complex Mappings List Processing Side Effects Multipart Selections Value Switches Tabular Ternaries do-while Loops Linear Coding Distributed Control Redoing Loop Labels 7. 93 94 96 97 100 101 103 105 108 110 111 112 113 114 117 118 121 123 125 126 128 129 Documentation . . 132 Types of Documentation Boilerplates Extended Boilerplates 132 133 138 Table of Contents | vii
Location Contiguity Position Technical Documentation Comments Algorithmic Documentation Elucidating Documentation Defensive Documentation Indicative Documentation Discursive Documentation Proofreading 139 140 140 141 141 142 143 144 145 145 148 Built-in Functions . :. . 149 Sorting Reversing Lists Reversing Scalars Fixed-Width Data Separated Data Variable-Width Data String Evaluations Automating Sorts Substrings Hash Values Globbing Sleeping Mapping and Grepping Utilities 149 152 153 154 157 158 161 164 165 166 167 168 169 170 Subroutines. . 175 Call Syntax Homonyms Argument Lists Named Arguments Missing Arguments Default Argument Values Scalar Return Values Contextual Return Values Multi-Contextual Return Values Prototypes viii ( Table of Contents 175 177 178 182 184 185 186 188 191 194
Implicit Returns Returning Failure 10. I/O. . 202 Filehandles Indirect Filehandles Localizing Filehandles Opening Cleanly Error Checking Cleanup Input Loops Line-Based Input Simple Slurping Power Slurping Standard Input Printing to Filehandles Simple Prompting Interactivity Power Prompting Progress Indicators Automatic Progress Indicators Autoflushing 11. 197 199 202 204 205 207 208 209 211 212 213 214 216 217 217 218 220 222 224 224 References. . 227 227 228 230 232 Dereferencing Braced References Symbolic References Cyclic References 12. Regular Expressions. . 235 236 237 239 240 240 242 242 246 247 Extended Formatting Line Boundaries String Boundaries End of String Matching Anything Lazy Flags Brace Delimiters Other Delimiters Metacharacters Table of Contents | ix
Named Characters Properties Whitespace Unconstrained Repetitions Capturing Parentheses Captured Values Capture Variables Piecewise Matching Tabular Regexes Constructing Regexes Canned Regexes Alternations Factoring Alternations Backtracking String Comparisons 13. Error Handling . 273 Exceptions Builtin Failures Contextual Failure Systemic Failure Recoverable Failure Reporting Failure Error Messages Documenting Errors OO Exceptions Volatile Error Messages Exception Hierarchies Processing Exceptions Exception Classes Unpacking Exceptions 14. I 274 278 279 280 281 283 284 286 287 290 291 292 293 296 Command-Line Processing. 299 Command-Line Structure Command-Line Conventions Meta-options In-situ Arguments Command-Line Processing x 247 248 249 250 252 253 254 257 259 261 263 265 266 269 271 Table of Contents 300 301 303 304 306
Interface Consistency Interapplication Consistency 311 314 15. Objects. . 318 Using OO Criteria Pseudohashes Restricted Hashes Encapsulation Constructors Cloning Destructors Methods Accessors Lvalue Accessors Indirect Objects Class Interfaces Operator Overloading Coercions 319 320 322 322 323 333 334 336 338 340 346 349 351 354 356 16. Class Hierarchies. . 359 Inheritance Objects Blessing Objects Constructor Arguments Base Class Initialization Construction and Destruction Automating Class Hierarchies Attribute Demolition Attribute Building Coercions Cumulative Methods Autoloading 360 361 365 367 371 376 383 384 387 388 389 393 17. Modules. . 397 397 401 404 405 Interfaces Refactoring Version Numbers Version Requirements Table of Contents | xi
Exporting Declarative Exporting Interface Variables Creating Modules The Standard Library CPAN 18. Testing and Debugging. . 420 TestCases Modular Testing Test Suites Failure What to Test Debugging and Testing Strictures Warnings Correctness Overriding Strictures The Debugger Manual Debugging Semi-Automatic Debugging 19. I 420 421 424 425 426 427 429 431 432 433 436 437 439 Miscellanea. 441 Revision Control Other Languages Configuration Files Formats Ties Cleverness Encapsulated Cleverness Benchmarking Memory Caching Memoization Caching for Optimization Profiling Enbugging xii 407 409 411 415 417 418 Table of Contents 441 442 445 449 451 453 454 456 459 460 462 463 464 466
A. Essential Perl Best Practices. 469 B. Perl Best Practices. 472 C. Editor Configurations . 482 D. Recommended Modules and Utilities . 487 E. Bibliography. 493 Index. 495 Table of Contents | xiii |
any_adam_object | 1 |
any_adam_object_boolean | 1 |
author | Conway, Damian |
author_facet | Conway, Damian |
author_role | aut |
author_sort | Conway, Damian |
author_variant | d c dc |
building | Verbundindex |
bvnumber | BV020873821 |
classification_rvk | ST 250 |
ctrlnum | (OCoLC)883589788 (DE-599)BVBBV020873821 |
discipline | Informatik |
discipline_str_mv | Informatik |
edition | First edition |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01496nam a2200397 c 4500</leader><controlfield tag="001">BV020873821</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20220830 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">051117s2005 |||| |||| 00||| eng d</controlfield><datafield tag="015" ind1=" " ind2=" "><subfield code="a">05,N36,0033</subfield><subfield code="2">dnb</subfield></datafield><datafield tag="016" ind1="7" ind2=" "><subfield code="a">976028999</subfield><subfield code="2">DE-101</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0596001738</subfield><subfield code="c">: EUR 38.00</subfield><subfield code="9">0-596-00173-8</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780596001735</subfield><subfield code="9">978-0-596-00173-5</subfield></datafield><datafield tag="024" ind1="3" ind2=" "><subfield code="a">9780596001735</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)883589788</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV020873821</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rda</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-29T</subfield><subfield code="a">DE-1051</subfield><subfield code="a">DE-573</subfield><subfield code="a">DE-706</subfield><subfield code="a">DE-355</subfield><subfield code="a">DE-19</subfield><subfield code="a">DE-188</subfield><subfield code="a">DE-M100</subfield></datafield><datafield tag="080" ind1=" " ind2=" "><subfield code="a">004.42</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">004</subfield><subfield code="2">sdnb</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Conway, Damian</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Perl best practices</subfield><subfield code="c">Damian Conway</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">First edition</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Beijing ; Cambridge ; Farnham ; Köln</subfield><subfield code="b">O'Reilly</subfield><subfield code="c">2005</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">xxii, 517 Seiten</subfield><subfield code="b">Diagramme</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Perl</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4307836-9</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Perl</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4307836-9</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Regensburg - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=014195528&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-014195528</subfield></datafield></record></collection> |
id | DE-604.BV020873821 |
illustrated | Not Illustrated |
index_date | 2024-07-02T13:26:50Z |
indexdate | 2024-07-09T20:27:12Z |
institution | BVB |
isbn | 0596001738 9780596001735 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-014195528 |
oclc_num | 883589788 |
open_access_boolean | |
owner | DE-29T DE-1051 DE-573 DE-706 DE-355 DE-BY-UBR DE-19 DE-BY-UBM DE-188 DE-M100 |
owner_facet | DE-29T DE-1051 DE-573 DE-706 DE-355 DE-BY-UBR DE-19 DE-BY-UBM DE-188 DE-M100 |
physical | xxii, 517 Seiten Diagramme |
publishDate | 2005 |
publishDateSearch | 2005 |
publishDateSort | 2005 |
publisher | O'Reilly |
record_format | marc |
spelling | Conway, Damian Verfasser aut Perl best practices Damian Conway First edition Beijing ; Cambridge ; Farnham ; Köln O'Reilly 2005 xxii, 517 Seiten Diagramme txt rdacontent n rdamedia nc rdacarrier Perl Programmiersprache (DE-588)4307836-9 gnd rswk-swf Perl Programmiersprache (DE-588)4307836-9 s DE-604 Digitalisierung UB Regensburg - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=014195528&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Conway, Damian Perl best practices Perl Programmiersprache (DE-588)4307836-9 gnd |
subject_GND | (DE-588)4307836-9 |
title | Perl best practices |
title_auth | Perl best practices |
title_exact_search | Perl best practices |
title_exact_search_txtP | Perl best practices |
title_full | Perl best practices Damian Conway |
title_fullStr | Perl best practices Damian Conway |
title_full_unstemmed | Perl best practices Damian Conway |
title_short | Perl best practices |
title_sort | perl best practices |
topic | Perl Programmiersprache (DE-588)4307836-9 gnd |
topic_facet | Perl Programmiersprache |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=014195528&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT conwaydamian perlbestpractices |