Future...plBase(3pm)

πŸ’– Future::IO::ImplBase β€” bestie edition πŸ’–

ok so this is the Future::IO::ImplBase page, from the User Contributed Perl Documentation collection, manual section 3pm. Sit down, get comfy, we're doing Perl internals and it's gonna be adorable. πŸŽ€


✨ NAME ✨

Future::IO::ImplBase β€” it's the base class for Future::IO implementations. like, the blueprint bestie, the template, the moment. πŸ’…


🌸 DESCRIPTION 🌸

okay so this package hands you a couple of utility methods that can genuinely help when you're out here writing actual Future::IO implementation classes. super handy, lowkey iconic.

but hear me β€” it is entirely optional. implementations are not required to use it. no pressure, no cap. you do you. πŸ¦‹


πŸ‘‘ CLASS METHODS πŸ‘‘

πŸ’« APPLY

__PACKAGE__->APPLY;

so what this does is it attempts to set the value of the $Future::IO::IMPL variable to the name of the calling package. that's it. that's the whole vibe. it attempts. πŸ™ˆ


🧚 DEFAULT METHODS 🧚

these methods are provided based on lower-level functionality that the implementing class should provide. so like, you bring the basics, this base class serves the rest. teamwork, fr fr. 🫢

πŸ“ accept

Implemented by wrapping ready_for_read, as sysread uses.

⏰ alarm

Implemented by wrapping sleep.

πŸ”Œ connect

Implemented by wrapping ready_for_write, as syswrite uses.

πŸ“₯ recv

πŸ“¬ recvfrom

Implemented by wrapping ready_for_read, as sysread uses.

πŸ“€ send

Implemented by wrapping ready_for_write, as syswrite uses.

πŸ“– sysread

Requires a lower-level method

$f = $class->ready_for_read( $fh );

which should return a Future that completes when the given filehandle may be ready for reading. key word: may. don't come for me. 😌

✍️ syswrite

Requires a lower-level method

$f = $class->ready_for_write( $fh );

which should return a Future that completes when the given filehandle may be ready for writing. again β€” may. slay. πŸ”₯


🌈 AUTHOR 🌈

Paul Evans <leonerd@leonerd.org.uk> β€” the icon, the legend, the main character who wrote all this. πŸ‘‘


ok that's the whole page bestie, no notes, periodt. πŸ’œ

this lil manual was generated for perl v5.42.0, dated 2026-01-18, and it lives in section 3pm β€” catch you later, mwah! πŸ’–βœ¨

πŸ“¦ where this page comes from