.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "POE::Resource 3" .TH POE::Resource 3 2024-07-13 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME POE::Resource \- internal resource managers for POE::Kernel .SH SYNOPSIS .IX Header "SYNOPSIS" Varies, although most POE::Resource subclasses do not have public APIs. .SH DESCRIPTION .IX Header "DESCRIPTION" POE manages several types of information internally. Its Resource classes are mix-ins designed to manage those types of information behind tidy, mostly private interfaces. This was done to facilitate testing and a conversion to C without the need to port POE::Kernel all at once. .PP POE::Resource subclasses are generally different from one another, but there are some similarities to note. .PP Every resource should have an initializer and finalizer method. Initializers set up initial data and link resources into POE::Kernel. Finalizers clean up any remaining data and verify that each resource subsystem was left in a consistent state. .PP One common theme in resource implementations is that they don't need to perform much error checking, if any. Resource methods are used internally by POE::Kernel and/or POE::API classes, so it's up to them to ensure correct usage. .PP Resource methods follow the naming convention _data_???_activity, where ??? is an abbreviation for the type of resource it belongs to: .PP .Vb 3 \& POE::Resource::Events _data_ev_initialize \& POE::Resource::FileHandles _data_handle_initialize \& POE::Resource::Signals _data_sig_initialize .Ve .PP Finalizer methods end in "_finalize". .PP .Vb 3 \& _data_ev_finalize \& _data_handle_finalize \& _data_sig_finalize .Ve .PP Finalizers return true if a resource shut down cleanly, or false if there were inconsistencies or leaks during end-of-run checking. The t/res/*.t tests rely on these return values. .SH "SEE ALSO" .IX Header "SEE ALSO" POE::Resource::Aliases, POE::Resource::Events, POE::Resource::Extrefs, POE::Resource::FileHandles, POE::Resource::SIDs, POE::Resource::Sessions, POE::Resource::Signals .PP Also see "Resources" in POE::Kernel for public information about POE resources. .SH BUGS .IX Header "BUGS" None known. .SH "AUTHORS & LICENSING" .IX Header "AUTHORS & LICENSING" Please see POE for more information about its authors, contributors, and licensing.