Preparing for Perl 7 (retired)
Preparing for Perl 7 (retired)
Level up to Perl 5.32 to be ready for Perl 7
About the Book
(I've "retired" this book. It looks like Perl 7 is not likely to happen, and even then, the advice from the time I published this is likely for a different universe of possibilities. If you still want to read this, let me know. I might repurpose the material by taking out the Perl 7 angle.)
Perl 7 will be essentially Perl 5, but with different default settings. You'll learn about the changes that have happened with Perl in the last decade and what you need to do to be compatible with v5.32. Along with that, you'll learn about the optional settings Perl 5 has and what you need to do when they are enabled by default rather than by request. You have plenty of time to ensure a smooth transition.
Much of this is basic best practice advice that benefits your Perl 5 programs even if you never make the jump to Perl 7. For instance, the strict and warnings features will automatically be enabled. Handle those in your existing code and you should have more robust programs, giving you more confidence in your work.
Table of Contents
- Preface
- How to read this book
- The ebook experience
- Prior Perl experience
- A note on links
- Other books that may help
- What about Perl 6?
- About the publisher
- Acknowledgments
- Other books by brian
- POD ERRORS
- Introduction
- A new social contract
- Coexistence
- The history of major releases
- A path forward
- Managing the change
- Upgrading legacy Perl
- Quick and dirty
- The quick advice
- Declare a minimum version of Perl
- Upgrade to at least v5.30
- Strict
- Warnings
- Bareword filehandles
- Signatures
- Prototypes
- Indirect objects
- Multidimensional array emulation
- Unicode
- The quick advice
- Helpful Perl features
- Load modules from the command line
- Perl::Critic
- Set up Perl::Critic
- A Perl 7 profile
- A warning about dynamic policies
- Further reading
- Strict parsing
- Strict categories
- Soft references
- Poetry mode
- Variable declarations
- All together now
- What you need to do now
- What we don't know yet
- Further reading
- POD ERRORS
- Strict categories
- Warnings
- The warnings pragma
- Warning categories
- Old school warnings
- A bit of wisdom
- Fatal warnings
- What you need to do now
- Test for warnings
- What we don't know yet
- Further reading
- The warnings pragma
- No bareword filehandles
- The problem with barewords
- The standard filehandles
- Autovivified handles
- What you need to do now
- What we don't know yet
- Further reading
- The problem with barewords
- Prototypes
- Hints for the parser
- The :prototype attribute
- What you need to do now
- If you are using prototypes
- Updating my modules
- Set prototypes with Sub::Util
- What we don't know yet
- Further reading
- Subroutine signatures
- What you need to do now
- What we don't know yet
- Further reading
- No indirect objects
- Indirect object notation
- Turn off indirect notation
- Indirect filehandles
- What you need to do now
- What we don't know yet
- Further reading
- No Perl 4-style multidimensional arrays
- Concatenating indices
- Sparse arrays
- What you should do now
- Proper multidimensional arrays
- What we don't know yet
- Further reading
- Concatenating indices
- Unicode
- Think about encodings
- Your source code
- Output encoding
- Single filehandles
- New filehandles
- Input encoding
- Command-line arguments
- Filenames
- The -C switch
- What you need to do now
- What we don't know yet
- Further Reading
- Miscellaneous features
- Stop doing these things
- 0 .. "-1"
- Changing the array base
- False postfix conditions
- Unescaped literal left brace
- Unquoted empty heredoc terminators
- Smart-match, given-when
- dot in @INC
- Lexical $_
- autoderef
- Vertical tab in \s
- Expanded character class definitions
- Stop doing these things
- Compatibility mode
- Short term coexistence
- Rewriting shebang lines
- Choose your Perl
- Specify your protocol
- module::compatibility
- Short term coexistence
- Conclusion
- Fix that code
- Promote Perl 7
- Respond to questions about Perl 6
- Open questions
- Table for features
- Changes to the book
- The changes
- July 9, 2020
- July 5, 2020
- June 24, 2020
- The changes
Other books by this author
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them