Proposal

Mastering Perl fills in the gaps between Programming Perl and Advanced Perl Programming. The former is a definitive reference to Perl and outside the context of any problem. The latter takes all the acculumated Perl wisdom and applies selected parts it to specific problems. Mastering Perl teaches the concepts Perl programmers should know, but left out of Learning Perl and Intermediate Perl.

What will this book be good for?

This book continues the Perl education started in Learning Perl and Intermediate Perl. Each of those thin books introduced the topics and gave the reader enough information to start using those parts of Perl. Mastering Perl extends some of those subjects while dicussing the wisdom of their proper use, and introduces the subjects left out of those books. Additionally, Mastering Perl covers the subjects that the latest edition of Advanced Perl Programming discarded from the first edition.

The market for the book.

I expect that the market for Mastering Perl will be about the same as Programming Perl. I'd like to include a foreword from Randal Schwartz, the name that people trust when it comes to Perl, for a bit of a sales boost.

The outline

Introduction

I group subjects into major sections that unify their chapters. Besides the particular topics that each chapter illustrates and explains, each section imparts a particular section of Perl wisdom

Thinking in Perl

The first section covers the Perl mindset and how that affects the mastery of Perl. Learn how Perl tackles problems and use that to your advantage instead of wrestling with it.

        Perl Context
                strings and numbers
                scalar and list
                void, array, and scalar
        The Four programming models in Perl
                Functional
                Procedural / Imperative
                Logic
                Descriptive
                        Perl data structures
        Dealing with Pod

Doing More with Less

This section shows how a little Perl knowledge can save a lot of code, without making the code harder to read. Perl is an extremely flexible language that allows you to take a higher view of a problem. With a little more Perl skill and a few patterns to keep in mind, a lot of code that you find hard to extend can turn into a little code that's a snap to extend.

        Dynamic method calls
        Dispatch tables
        Closures
        Tied Variables
        Advanced Perl Regular Expression
        Mastering array operations
                splice

Robust Perl Programs

You may have only written programs to do one thing and to do it just for you, but with a little more work your Perl programs can run on just about any platform so your users don't have to touch your code to apply it to other tasks.

        Portable Perl
                File::Spec
        Data persistence
                pack
                Data::Dumper, YAML
                Storable
                DBI
        Input and Output
        Configuration / Options / Environment
        Logging
        Interprocess communication
        Hooking into other languages
                Inline::C

Maintaining Perl

We didn't write every Perl program that we have to maintain, and we didn't get to choose how they were written. This section goes over wrangling the Perl code you get from others as well as some of the dark corners encountered in difficult code.

        Cleansing Perl Code
                perltidy
                refactoring
        Dark Corners and Dead Ends
                Symbol Tables and Globs
                Source Filters
        Automating tests and checks
        Handling Errors

Tuning Perl

What's happening inside my Perl program? Why does it slow down, use more memory, or do anything that it does?

        What happens when a Perl script "runs"?
        Benchmarking
        The perl debugger
                Customized debuggers
        Memory use
        Profiling
        Optimizing
        Error Handling

Schedule

I intend to complete the writing portion of the process by the end of 2006. This is longer than the times I've used to update Learning Perl and Intermediate Perl, but this is going to be all new writing and, as far as I can tell, a different sort of Perl book.

I propose this tentative schedule. I might be able to work faster, but I can't make promises.

Advance payments

I do not want an advance payment.

My writing sample

I co-authored ``Learning Perl, 4th Edition'' and ``Intermediate Perl'' and have written several articles for the O'Reilly Network, The Perl Journal, and The Perl Review. A full list of previous publications is on my web page: http://www.pair.com/comdog/

Tools

I'll use plain text POD. I used POD for Learning Perl and Intermediate Perl. I'm familiar with O'Reilly's pseudo-pod extensions and have already developed a set of tools to work with them.

Who I am

brian d foy has been an instructor for Stonehenge Consulting Services since 1998, a Perl user since he was a physics graduate student, and a die-hard Mac user since he first owned a computer. He founded the first Perl user group, the New York Perl Mongers, as well as the Perl advocacy nonprofit Perl Mongers, Inc., which helped form more than 200 Perl user groups across the globe. He maintains the perlfaq portions of the core Perl documentation, several modules on CPAN, and some stand-alone scripts. He's the publisher of The Perl Review, a magazine devoted to Perl, and is a frequent speaker at conferences including the Perl Conference, Perl University, MarcusEvans BioInformatics '02, and YAPC. His writings on Perl appear in The O'Reilly Network, The Perl Journal, Dr. Dobbs, and The Perl Review, on use.perl.org, and in several Perl usenet groups.