IO::In...e::Tiny(3pm)

πŸ“¦
version 0.2 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ IO::Interactive::Tiny ✨

okay bestie, gather round πŸ’– this is the manual page for IO::Interactive::Tiny (a perl module, obvi), and it's literally the tiny little "am I talking to a human or a pipe rn" checker. no cap.


🌸 NAME 🌸

IO::Interactive::Tiny β€” it gives you is_interactive() without dragging in a whole friend group of dependencies. periodt.


πŸŽ€ VERSION πŸŽ€

This document describes IO::Interactive::Tiny version 0.2. she's a 0.2 and she's thriving πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use IO::Interactive::Tiny;

if ( IO::Interactive::Tiny::is_interactive() ) {
    print "I probably want text output.";
}
else {
    print "I probably want HTML output.";
}

like… she's asking "is there a real person on the other end?" and then picking her whole aesthetic accordingly 😭 text mode or HTML mode, no in-between.


🌈 DESCRIPTION 🌈

She provides the useful subset of what IO::Interactive's XS does β€” except the only thing she ships is is_interactive(). that's it. that's the whole girl. minimalism is the vibe 🧚

And she earns her ::Tiny crown by not using version, Carp, or Scalar::Util. not one of them. she's traveling light βœˆοΈπŸ’–


πŸ‘‘ INTERFACE πŸ‘‘

Nothing is exported and nothing is exportable β€” and honestly that's the point, it's what keeps her '::Tiny'. no @EXPORT, no @EXPORT_OK, no drama πŸ™ˆ

πŸ’œ IO::Interactive::Tiny::is_interactive()

Does exactly what is_interactive() in IO::Interactive does. same functionality, same energy, way less baggage. slay πŸ’…


🩺 DIAGNOSTICS 🩺

IO::Interactive::Tiny throws no warnings or errors of its own β€” she's not a yeller, she's a chill queen. 😌


βš™οΈ CONFIGURATION AND ENVIRONMENT βš™οΈ

Zero config files. Zero environment variables. She requires none, needs none, wants none. low maintenance bestie fr fr 🌸


πŸ“¦ DEPENDENCIES πŸ“¦

None. literally none. iconic behavior.


πŸ’€ INCOMPATIBILITIES πŸ’€

None reported. nobody has come for her yet and we love that for her 🫢


πŸ› BUGS AND LIMITATIONS πŸ›

No bugs have been reported. (we're all pretending that's the same thing as "there are no bugs", it's fine, it's fine 😭)

If you do find something, or you want a new feature, please report it to bug-io-interactive-tiny@rt.cpan.org, or slide through the web interface at <http://rt.cpan.org>. she wants to hear from you, ngl 🌈


⭐ About the '::Tiny' status ⭐

Everything below is measured relative to IO::Interactive (v0.0.6). just so we're comparing apples to apples πŸ“

Go read Acme::Tiny if you want the whole lore on the ::Tiny suffix β€” iykyk.

And #3 is really really close:

[ -- RSS Memory -- ]
  Baseline perl 1204
  IO::Interactive 2464 (+1260)
  IO::Interactive::Tiny 1332 (+128)

like LOOK at those numbers bestie. +1260 versus +128. that's not a glow-up, that's a transformation πŸ’…βœ¨

And even though time isn't really a ::Tiny factor, it does improve loading a bit:

[ -- time -- ]
Baseline perl
  real  0m0.014s
  user  0m0.004s
  sys   0m0.008s

IO::Interactive
  real  0m0.023s
  user  0m0.013s
  sys   0m0.009s

IO::Interactive::Tiny
  real  0m0.013s
  user  0m0.004s
  sys   0m0.008s

Regarding tests: t/01.is_interactive.t is the same as t/is_interactive.t in IO::Interactive. same test, new outfit πŸŽ€


🫢 AUTHOR 🫢

Daniel Muey <http://drmuey.com/cpan_contact.pl> β€” shoutout to the author, the originator, the main character of this module πŸ‘‘


Copyright (c) 2011, Daniel Muey <http://drmuey.com/cpan_contact.pl>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. so go wild, just read the rules first, bestie πŸ“œβœ¨


πŸ”₯ DISCLAIMER OF WARRANTY πŸ”₯

okay so this part is in ALL CAPS in the original and honestly it deserves the drama, so buckle up:

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

tl;dr bestie: free software, zero promises, you break it you bought it πŸ’€ no take-backs, no refunds, no vibes of liability.

and that's a wrap 🎬 this page was brought to you by perl version v5.36.0, dated 2022-10-13, and filed under IO::Interactive::Tiny(3pm) β€” go check is_interactive() and stay tiny, my love πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from