SEARCH RESULTS

FAQ

"How do I define methods for every class/object?" in perlfaq4

How do I define methods for every class/object? ... an object system like Moose that supports roles.

"Where can I learn about object-oriented Perl programming?" in perlfaq3

Where can I learn about object-oriented Perl programming? ... A good book on OO on Perl is the "Object-Oriented Perl" by Damian Conway from Manning Publications, or

"Why can't a method included in this same file be found?" in perlfaq7

You may also use print ref($object) to find out the class $object was blessed into. ... Object notation is explained in perlobj.

"How do I parse a mail header?" in perlfaq9

, consider passing it to Email::Abstract and then using its cast method to get an Email::MIME object: ... my $abstract = Email::Abstract->new($mail_message_object); my $email_mime_object = $abstract->cast

"How can I find out my current or calling package?" in perlfaq7

= blessed( $object ); Most of the time, you shouldn't care what package an object is blessed into, ... For that, you can use DOES, which comes from UNIVERSAL: my $class_does_it = eval { $object->DOES

"How do I use MIME to make an attachment to a mail message?" in perlfaq9

Email::MIME objects themselves are parts and can be attached to other Email::MIME objects.

"How do I read email?" in perlfaq9

email/folder'); while(my $message = $folder->next_message) { # next_message returns Email::Simple objects ... , but we want # Email::MIME objects as they're more robust my $mime = Email::MIME->new($message

"How can I compare two dates and find the difference?" in perlfaq4

The Time::Piece module, which comes with Perl, replaces localtime with a version that returns an object ... the past\n"; } You can also get differences with a subtraction, which returns a Time::Seconds object

"How do I do (anything)?" in perlfaq3

the Perl interpreter perldebug - Perl debugging Functions perlfunc - Perl builtin functions Objects ... perltie - how to hide an object class in a simple variable Data Structures perlref - Perl references

"How can I use a filehandle indirectly?" in perlfaq5

It doesn't work with objects or strings, which might be a bug we haven't fixed yet. ... Playing the object game doesn't help you at all here.

"How can I comment out a large block of Perl code?" in perlfaq7

You end the comment with =cut, ending the Pod section: =pod my $object = NotGonnaHappen->new ... You still need the =cut to go back to Perl code from the Pod comment: =begin comment my $object

"Which web framework should I use?" in perlfaq9

Catalyst Strongly object-oriented and fully-featured with a long development history and a large community ... Web::Simple Strongly object-oriented and minimal, built for speed and intended as a toolkit for building

"How can I pass/return a {Function, FileHandle, Array, Hash, Method, Regex}?" in perlfaq7

You need to pass references to these objects. ... *D/i); Passing Methods To pass an object method into a subroutine, you can do this: call_a_lot

"How can I use curses with Perl?" in perlfaq3

The Curses module from CPAN provides a dynamically loadable object module interface to a curses library

"How can I make the Perl equivalent of a C structure/C++ class/hash or array of hashes or arrays?" in perlfaq4

Examples of structures and object-oriented classes are in perlootut.

"How do I extract URLs?" in perlfaq9

HTML::SimpleLinkExtor will extract URLs from HTML, it handles anchors, images, objects, frames, and many

"What is Raku (Perl 6)?" in perlfaq1

Raku has proven to be a fascinating source of ideas for those using Perl (the Moose object system is

"How do I fetch an HTML file?" in perlfaq9

www.example.com/index.html", "foo.html" ); If you need to do something more complicated, the HTTP::Tiny object

"How do I handle circular lists?" in perlfaq4

print $cycle; # 000000 print $cycle; # FFFF00 The Array::Iterator::Circular creates an iterator object

"How do I send email?" in perlfaq9

$message->transport($email_sender_transport_object)->send_or_die;

More results found. Refine your search terms or show all FAQ results.

Functions

bless - create an object

See perlobj for more about the blessing (and blessings) of objects. ... Consider always blessing objects in CLASSNAMEs that are mixed case.

ref - find out the type of thing being referenced

If the operand is a reference to a blessed object, then the name of the class into which the referent ... If the operand is a reference to an unblessed object, then the return value indicates the type of object

opendir - open a directory

Dirhandles are the same objects as filehandles; an I/O object can only be open as one of these handle

exec - abandon this program to run another

Using an indirect object with exec or system is also more secure. ... Note that exec will not call your END blocks, nor will it invoke DESTROY methods on your objects.

die - raise an exception or bail out

This permits more elaborate exception handling using objects that maintain arbitrary state about the ... information into the object yourself.

tied - get a reference to the object underlying a tied variable

tied VARIABLE Returns a reference to the object underlying VARIABLE (the same value that was originally

tie - bind a variable to an object class

CLASSNAME is the name of a class implementing objects of correct type. ... The object returned by the constructor is also returned by the tie function, which would be useful if

lock - get a thread lock on a variable, subroutine, or method

lock THING This function places an advisory lock on a shared variable or referenced object contained

exit - terminate this program

Likewise any object destructors that need to be called are called before the real exit.

fileno - return file descriptor from filehandle

there is no real file descriptor at the OS level, as can happen with filehandles connected to memory objects

getpwnam - get passwd record given user login name

These override the normal built-ins, supplying versions that return objects with the appropriate names ... is different from a User::pwent object.

require - load in external functions from a library at runtime

There are three forms of hooks: subroutine references, array references, and blessed objects. ... INC method that will be called as above, the first parameter being the object itself.

package - declare a separate global namespace

If VERSION is provided, package sets the $VERSION variable in the given namespace to a version object

select - reset default output or do I/O multiplexing

oldfh = select(STDERR); $| = 1; select($oldfh); Some programmers may prefer to think of filehandles as objects

each - retrieve the next key/value pair from a hash

loops quite fragile: it is easy to arrive at such a loop with the iterator already part way through the object

Documentation

TAP::Object - Base class that provides common functionality to all TAP::* modules

by TAP::Object sub _initialize { my ( $self, @args) = @_; # initialize your object return ... Returns a new object. Instance Methods _initialize Initializes a new object.

Time::Piece - Object Oriented time objects

NAME Time::Piece - Object Oriented time objects SYNOPSIS use Time::Piece; my $t = localtime; ... Time::Piece object However adding a Time::Piece object to another Time::Piece object will cause a runtime

perlobj - Perl object reference

NAME perlobj - Perl object reference DESCRIPTION This document provides a reference for Perl's object ... of the object, such as its memory address, rather than in the object itself.

Test2::API::Context - Object to represent a testing context.

NAME Test2::API::Context - Object to represent a testing context. ... You MUST NOT pass context objects around When you obtain a context object it is made specifically for

version - Perl extension for Version Objects

How to compare version objects Version objects overload the cmp and <=> operators. ... a non-version object, the non-object term will be converted to a version object using parse().

perlootut - Object-Oriented Programming in Perl Tutorial

OBJECT-ORIENTED FUNDAMENTALS Most object systems share a number of common concepts. ... Composition In object-oriented code, we often find that one object references another object.

IO::Socket - Object interface to socket communications

NAME IO::Socket - Object interface to socket communications SYNOPSIS use strict; use warnings; use ... This object can be used to communicate with the client that was trying to connect.

version::Internals - Perl extension for Version Objects

NAME version::Internals - Perl extension for Version Objects DESCRIPTION Overloaded version objects ... NOTE: if you create a new object using an existing object like this: $v2 = $v1->new(); the new object

IPC::Semaphore - SysV Semaphore IPC object class

NAME IPC::Semaphore - SysV Semaphore IPC object class SYNOPSIS use IPC::SysV qw(IPC_PRIVATE S_IRUSR ... getncnt; $zcnt = $sem->getzcnt; $ds = $sem->stat; $sem->remove; DESCRIPTION A class providing an object

IPC::Msg - SysV Msg IPC object class

NAME IPC::Msg - SysV Msg IPC object class SYNOPSIS use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR); ... stat Returns an object of type IPC::Msg::stat which is a sub-class of Class::Struct.

IPC::SharedMem - SysV Shared Memory IPC object class

NAME IPC::SharedMem - SysV Shared Memory IPC object class SYNOPSIS use IPC::SysV qw(IPC_PRIVATE S_IRUSR ... stat Returns an object of type IPC::SharedMem::stat which is a sub-class of Class::Struct.

IO::Socket::UNIX - Object interface for AF_UNIX domain sockets

NAME IO::Socket::UNIX - Object interface for AF_UNIX domain sockets SYNOPSIS use IO::Socket::UNIX; ... Peer => $SOCK_PATH, ); # Now read and write from $client DESCRIPTION IO::Socket::UNIX provides an object

IO::Socket::INET - Object interface for AF_INET domain sockets

NAME IO::Socket::INET - Object interface for AF_INET domain sockets SYNOPSIS use IO::Socket::INET; ... DESCRIPTION IO::Socket::INET provides an object interface to creating and using sockets in the AF_INET

IO::Handle - supply object methods for I/O handles

NAME IO::Handle - supply object methods for I/O handles SYNOPSIS use IO::Handle; $io = IO::Handle ... CONSTRUCTOR new () Creates a new IO::Handle object.

Test2::API::Instance - Object used by Test2::API under the hood

NAME Test2::API::Instance - Object used by Test2::API under the hood DESCRIPTION This object encapsulates ... This can also be an instantiated object.

IO::Seekable - supply seek based methods for I/O objects

NAME IO::Seekable - supply seek based methods for I/O objects SYNOPSIS use IO::Seekable; package IO ... does not have a constructor of its own as it is intended to be inherited by other IO::Handle based objects

Encode::Encoder - Encode::Encoder -- Object Oriented Encoder

NAME Encode::Encoder -- Object Oriented Encoder SYNOPSIS use Encode::Encoder; # Encode::encode("ISO ... Stringify dumps the data inside the object.

Test2::API::Stack - Object to manage a stack of Test2::Hub instances.

NAME Test2::API::Stack - Object to manage a stack of Test2::Hub instances. ... DESCRIPTION This module is used to represent and manage a stack of Test2::Hub objects.

Time::tm - internal object used by Time::gmtime and Time::localtime

NAME Time::tm - internal object used by Time::gmtime and Time::localtime SYNOPSIS Don't use this module ... It creates a Time::tm struct object which is addressable just like's C's tm structure from time.h; namely

IO::Pipe - supply object methods for pipes

These two objects will be used for the system call to pipe. ... If no arguments are given then method handles is called on the new IO::Pipe object.

More results found. Refine your search terms or show all documentation results.

Perldeltas

"Version objects and vstrings" in perl5160delta

Version objects and vstrings The bitwise complement operator (and possibly other operators, too) when ... Version objects no longer cause memory leaks in boolean context [perl #109762].

"The overloading pragma and regexp objects" in perl5160delta

The overloading pragma and regexp objects With no overloading, regular expression objects returned by

"Reblessing overloaded objects now works" in perl589delta

Reblessing overloaded objects now works Internally, perl object-ness is on the referent, not the reference ... not, then any other existing references think that they (still) point to an overloaded object, choose

"Object-oriented overrides for builtin operators" in perl5004delta

Object-oriented overrides for builtin operators Many of the Perl builtins returning lists now have object-oriented

"$^V is now a version object instead of a v-string" in perl5100delta

$^V is now a version object instead of a v-string $^V can still be used with the %vd format in printf ... , but any character-level operations will now access the string representation of the version object

"Weak references" in perl56delta

The reference in the cache would hold a reference count on the object and the objects would never be ... When the last non-weak reference to an object is deleted, the object is destroyed and all the weak references

"Weak references" in perl561delta

The reference in the cache would hold a reference count on the object and the objects would never be ... When the last non-weak reference to an object is deleted, the object is destroyed and all the weak references

"Exception Handling" in perl5140delta

But a $SIG{__WARN__} handler now receives an object-based warning as an object, where previously it was ... passed the result of stringifying the object.

"Smart match and overloading" in perl5101delta

match and overloading According to the rule of dispatch based on the rightmost argument type, when an object ... that do not overload it (in order to avoid relying on the object's underlying structure).

"Smart match and overloading" in perl5120delta

match and overloading According to the rule of dispatch based on the rightmost argument type, when an object ... that do not overload it (in order to avoid relying on the object's underlying structure).

"Freeing weak references" in perl5140delta

Freeing weak references When there are many weak references to an object, freeing that object can under

"qr overloading" in perl5120delta

conversion to regexp, like it was already possible to overload conversion to boolean, string or number of objects ... It is invoked when an object appears on the right hand side of the =~ operator or when it is interpolated

"Smartmatching" in perl5160delta

Smartmatching ~~ now correctly handles the precedence of Any~~Object, and is not tricked by an overloaded ... object on the left-hand side.

"New or Changed Diagnostics" in perl583delta

New or Changed Diagnostics The fatal error "DESTROY created new reference to dead object" is now documented

"Updated Modules and Pragmata" in perl5182delta

introduced a regression in the behaviour of B::CV::GV, changing the return value from a B::SPECIAL object ... B::CV::GV again returns a B::SPECIAL object in this case.

"Modules and Pragmata" in perl5182delta

introduced a regression in the behaviour of B::CV::GV, changing the return value from a B::SPECIAL object ... B::CV::GV again returns a B::SPECIAL object in this case.

"PL_sv_objcount" in perl5180delta

PL_sv_objcount This interpreter-global variable used to track the total number of Perl objects in the

"Old OO Documentation" in perl5160delta

The perlbot (bag of object tricks) document has been removed as well.

"Removed Documentation" in perl5160delta

The perlbot (bag of object tricks) document has been removed as well.

"Extended support for exception handling" in perl5005delta

This makes it possible to propagate exception objects. This is an undocumented experimental feature.

More results found. Refine your search terms or show all perldelta results.