Perl 6 Deep Dive

Learn Perl 6 effortlessly to solve everyday problems

Perl 6 Deep Dive

Andrew Shitov

1 customer reviews
Learn Perl 6 effortlessly to solve everyday problems
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781787282049
Paperback402 pages

Book Description

Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages consisting of Perl 5 and Perl 6. Perl 6 helps developers write concise and declarative code that is easy to maintain.

This book is an end-to-end guide that will help non-Perl developers get to grips with the language and use it to solve real-world problems.

Beginning with a brief introduction to Perl 6, the first module in the book will teach you how to write and execute basic programs. The second module delves into language constructs, where you will learn about the built-in data types, variables, operators, modules, subroutines, and so on available in Perl 6. Here the book also delves deeply into data manipulation (for example, strings and text files) and you will learn how to create safe and correct Perl 6 modules. You will learn to create software in Perl by following the Object Oriented Paradigm. The final module explains in detail the incredible concurrency support provided by Perl 6. Here you will also learn about regexes, functional programming, and reactive programming in Perl 6.

By the end of the book, with the help of a number of examples that you can follow and immediately run, modify, and use in practice, you will be fully conversant with the benefits of Perl 6.

Table of Contents

Chapter 1: What is Perl 6?
Origins of Perl 6
Differences from Perl 5
Perl 6 resources
Compilers
Working with Rakudo Star
Writing our Hello World program
Summary
Chapter 2: Writing Code
Using Unicode
Whitespaces and unspaces
Comments
Creating Pod documentation
Phasers
Simple input and output
Summary
Chapter 3: Working with Variables and Built-in Data Types
Using variables
Using simple built-in data types
Data types to manipulate date and time
Summary
Chapter 4: Working with Operators
Operator classification
Operators in Perl 6
Meta-operators in Perl 6
User-defined operators
Summary
Chapter 5: Control Flow
Understanding code blocks and variable scoping
Conditional checks
Using loops
Executing code once
Collecting data with gather and take
Setting the topic with given
Summary
Chapter 6: Subroutines
Creating and calling subroutines
Type constraints
Multi subs
Nested subroutines
Creating operators
Passing functions as arguments
Anonymous subs
Summary
Chapter 7: Modules
Creating a module
Using modules
Introspection
Using zef
Summary
Chapter 8: Object-Oriented Programming
Creating a class
Working with attributes
Working with methods
More about attributes
Class methods
Inheritance
Appending objects and classes using roles
Using introspection to learn more
Method postfix operators
Summary
Chapter 9: Input and Output
Standard input and output
Working with files and directories
Reading from a stream
Writing to a stream
Summary
Chapter 10: Working with Exceptions
The try block
Soft failures
The CATCH phaser
The Exception object
The Failure object
Creating custom exceptions
Summary
Chapter 11: Regexes
Matching against regexes
Literals
Character classes
Creating repeated patterns with quantifiers
Extracting substrings with capturing
Using alternations in regexes
Positioning regexes with anchors
Looking forward and backward with assertions
Modifying regexes with adverbs
Substitution and altering strings with regexes
Summary
Chapter 12: Grammars
Creating a grammar
Using rules and tokens
Using actions
Using abstract syntax tree attributes
Using the actions class
The whole program
Summary
Chapter 13: Concurrent Programming
Junctions
Threads
Promises
Channels
Summary
Chapter 14: Functional Programming
What is functional programming?
Using recursion
Using reduction
Higher-order functions and lambdas
Piping data and feed operators
Manipulating the scope
Creating and using iterators
Lazy and infinite lists
Summary
Chapter 15: Reactive Programming
What is reactive programming?
On-demand supplies
Live supplies
Summary

What You Will Learn

  • Learn the background from which Perl 6 appeared and how it developed.
  • How to use Rakudo to run your programs.
  • Various Perl 6 built-in types and details about their behavior
  • Understand how scalar variables, hash variables, and arrays work
  • Create meta operators and hyper operators
  • How classes work and how to build software based on the Object Oriented Paradigm
  • How Perl 6 provides support for concurrency, functional programming, and reactive programming.

Authors

Table of Contents

Chapter 1: What is Perl 6?
Origins of Perl 6
Differences from Perl 5
Perl 6 resources
Compilers
Working with Rakudo Star
Writing our Hello World program
Summary
Chapter 2: Writing Code
Using Unicode
Whitespaces and unspaces
Comments
Creating Pod documentation
Phasers
Simple input and output
Summary
Chapter 3: Working with Variables and Built-in Data Types
Using variables
Using simple built-in data types
Data types to manipulate date and time
Summary
Chapter 4: Working with Operators
Operator classification
Operators in Perl 6
Meta-operators in Perl 6
User-defined operators
Summary
Chapter 5: Control Flow
Understanding code blocks and variable scoping
Conditional checks
Using loops
Executing code once
Collecting data with gather and take
Setting the topic with given
Summary
Chapter 6: Subroutines
Creating and calling subroutines
Type constraints
Multi subs
Nested subroutines
Creating operators
Passing functions as arguments
Anonymous subs
Summary
Chapter 7: Modules
Creating a module
Using modules
Introspection
Using zef
Summary
Chapter 8: Object-Oriented Programming
Creating a class
Working with attributes
Working with methods
More about attributes
Class methods
Inheritance
Appending objects and classes using roles
Using introspection to learn more
Method postfix operators
Summary
Chapter 9: Input and Output
Standard input and output
Working with files and directories
Reading from a stream
Writing to a stream
Summary
Chapter 10: Working with Exceptions
The try block
Soft failures
The CATCH phaser
The Exception object
The Failure object
Creating custom exceptions
Summary
Chapter 11: Regexes
Matching against regexes
Literals
Character classes
Creating repeated patterns with quantifiers
Extracting substrings with capturing
Using alternations in regexes
Positioning regexes with anchors
Looking forward and backward with assertions
Modifying regexes with adverbs
Substitution and altering strings with regexes
Summary
Chapter 12: Grammars
Creating a grammar
Using rules and tokens
Using actions
Using abstract syntax tree attributes
Using the actions class
The whole program
Summary
Chapter 13: Concurrent Programming
Junctions
Threads
Promises
Channels
Summary
Chapter 14: Functional Programming
What is functional programming?
Using recursion
Using reduction
Higher-order functions and lambdas
Piping data and feed operators
Manipulating the scope
Creating and using iterators
Lazy and infinite lists
Summary
Chapter 15: Reactive Programming
What is reactive programming?
On-demand supplies
Live supplies
Summary

Book Details

ISBN 139781787282049
Paperback402 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Java 9 New Features Deep Dive [Video] Book Cover
Java 9 New Features Deep Dive [Video]
$ 124.99
$ 106.25
Deep Dive into Statistical Modeling with R [Video] Book Cover
Deep Dive into Statistical Modeling with R [Video]
$ 124.99
$ 106.25
Deep Dive into Functional JavaScript [Video] Book Cover
Deep Dive into Functional JavaScript [Video]
$ 124.99
$ 106.25
Angular 2 Deep Dive [Video] Book Cover
Angular 2 Deep Dive [Video]
$ 94.99
$ 80.75
Deep Learning with Keras Book Cover
Deep Learning with Keras
$ 39.99
$ 28.00
Deep Learning with Hadoop Book Cover
Deep Learning with Hadoop
$ 31.99
$ 22.40