Download E-books Advanced Perl Programming PDF

By Simon Cozens

With a world neighborhood of clients and greater than 1000000 committed programmers, Perl has confirmed to be the best language for the most recent tendencies in computing and business.

Every programmer needs to stay alongside of the newest instruments and methods. This up-to-date model of Advanced Perl Programming from O'Reilly supplies the basic wisdom of the fashionable Perl programmer. no matter what your present point of Perl services, this booklet might help you push your abilities to the following point and develop into a extra entire programmer.

O'Reilly's so much high-level Perl educational up to now, Advanced Perl Programming, moment version teaches you all of the complicated concepts for production-ready Perl courses. This thoroughly up to date advisor basically explains thoughts similar to introspection, overriding built-ins, extending Perl's object-oriented version, and checking out your code for higher stability.

Other subject matters include:

  • Complex facts structures
  • Parsing
  • Templating toolkits
  • Working with usual language data
  • Unicode
  • Interaction with C and different languages

In addition, this consultant demystifies as soon as advanced issues like object-relational mapping and event-based development-arming you with every little thing you want to thoroughly improve your skills.

Praise for the second one Edition:

"Sometimes the largest hurdle to challenge fixing is not the topic itself yet quite the sheer variety of modules Perl presents. Advanced Perl Programming walks you thru Perl's TMTOWTDI ("There's multiple strategy to Do It") wooded area, explaining and evaluating the easiest modules for every job so that you can intelligently observe them in a number of situations." --Rocco Caputo, lead developer of POE

"It has been stated that sufficiently complicated Perl code is indistinguishable from magic. This booklet of spells is going some distance to unlocking these secrets and techniques. It has the facility to remodel the main humble programmer right into a Perl wizard." --Andy Wardley

"The info right here is not theoretical. It offers instruments and methods for fixing actual difficulties cleanly and elegantly." --Curtis 'Ovid' Poe

" Advanced Perl Programming collects well-deserved wisdom from the very best programmers within the Perl group, and explains it in a manner that even newcomers can observe immediately." --chromatic, Editor of Perl.com

Show description

Read or Download Advanced Perl Programming PDF

Best Linux books

RHCSA/RHCE Red Hat Linux Certification Study Guide, Seventh Edition (Exams EX200 & EX300)

In keeping with pink Hat firm Linux 7, the recent variation of this bestselling learn advisor covers the up to date purple Hat qualified method Administrator (RHCSA) and purple Hat qualified Engineer (RHCE) assessments. RHCSA/RHCE crimson Hat Linux Certification examine advisor, seventh version is totally revised to hide the lately published pink Hat firm Linux 7 and the corresponding RHCSA and RHCE certification assessments.

Linux (Hacking Exposed)

Tighten holes and preserve safeguard in your Linux method! From one of many authors of the foreign best-seller, Hacking uncovered: community safety secrets and techniques & options, comes a must have defense guide for somebody operating Linux. This state of the art volu

Advanced Linux Networking

With progressively more networks and mission-critical functions operating on Linux, method, and community directors needs to be capable of do greater than manage a server and depend upon its default configuration. this article is designed that will help you in achieving the next point of competence. It specializes in strong options and contours of Linux networking and gives you with the information you want to enhance server potency, improve protection, and adapt to new necessities.

Guide to Assembly Language Programming in Linux

Introduces Linux ideas to programmers who're acquainted with different working structures resembling home windows XP presents complete assurance of the Pentium meeting language

Additional resources for Advanced Perl Programming

Show sample text content

Those items certainly signify a number—a variety of seconds. in general, we would need to upload them including a few grotesque hack like this: my $new = $min->add($hour); or even then it is not transparent even if that alters the unique $min. So one typical use of operator overloading will be to let us to assert $min + $hour, and come back an item representing 3,660 seconds. and that's accurately what occurs: my $new = $min + $hour; print $new->seconds; # 3660 this can be performed by means of the next little bit of code within the Time::Seconds module: use overload '+' => \&add; # ... sub upload { my ($lhs, $rhs) = _get_ovlvals(@_); go back Time::Seconds->new($lhs + $rhs); } sub _get_ovlvals { my ($lhs, $rhs, $reverse) = @_; $lhs = $lhs->seconds; if (UNIVERSAL::isa($rhs, 'Time::Seconds')) { $rhs = $rhs->seconds; } elsif (ref($rhs)) { die "Can't use non Seconds item in operator overload"; } if ($reverse) { go back $rhs, $lhs; } go back $lhs, $rhs; } The overload pragma is the most important to all of it. It tells Perl to seem extra conscientiously at operations concerning items of that type, and it registers equipment for the given operators in a look-up desk. whilst an item is fascinated with an overloaded operation, the operation is appeared up within the desk and the ensuing approach referred to as. to that end, $obj + $other will name $obj->add($other, 0). the explanation Perl passes 3 parameters to the strategy is that during the case of $other + $obj, the place $other isn't an item that overloads +, we nonetheless anticipate the upload approach to be known as on $obj. for this reason, even though, Perl will name $obj->add($other, 1), to indicate that the arguments were reversed. The _get_ovlvals subroutine seems on the arguments to an operator and attempts to coerce them into numbers—other Time::Seconds gadgets are changed into numbers via having the seconds process referred to as on them, traditional numbers are undergone, and the other type of item motives a deadly errors. Then the arguments are reordered to the unique order. when we have usual numbers, we will be able to upload them jointly and go back a brand new Time::Seconds item according to the sum. the opposite operators are in accordance with this precept, comparable to <=>, which implements the entire comparability operators: use overload '<=>' => \&compare; sub evaluate { my ($lhs, $rhs) = _get_ovlvals(@_); go back $lhs <=> $rhs; } Time::Seconds additionally overloads project operators += and -=: use overload '-=' => \&subtract_from; sub subtract_from { my $lhs = shift; my $rhs = shift; $rhs = $rhs->seconds if UNIVERSAL::isa($rhs, 'Time::Seconds'); $$lhs -= $rhs; go back $lhs; } this lets you say $new += 60 so as to add one other minute to the hot period. ultimately, to prevent having to write down such subroutines for each type of operator, Time::Seconds makes use of a characteristic of overload known as fallback. This instructs Perl to try to immediately generate average tools from those unique: for example, the $x++ operator should be carried out when it comes to $x += 1, etc. Time::Seconds units fallback to undef, this means that Perl will try and use an autogenerated technique yet will die if it can't locate one.

Rated 4.75 of 5 – based on 6 votes