Test::...s::TIME(3pm)

πŸ“¦
version 0.002000 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Test::Effects::TIME πŸ’–

okay bestie, welcome to the manual page for Test::Effects::TIME β€” a lil Perl module from the User Contributed Perl Documentation collection. it's giving "lexically scoped timing toggle" energy and honestly? iconic. ✨


🌸 NAME 🌸

Test::Effects::TIME β€” lexically set the Test::Effects timing option. that's it, that's the whole job. πŸŽ€


🌈 VERSION 🌈

this doc describes Test::Effects::TIME version 0.000001. yes the version number is tiny. it's baby. it's fresh. periodt. πŸ¦‹


✨ SYNOPSIS ✨

okay so here's the vibe, in code:

{
    use Test::Effects::TIME;
    # Test::Effects times its tests

    {
        no Test::Effects::TIME;
        # Test::Effects doesn't time its tests here
    }

    # Test::Effects reverts to timing its tests again here

}
# Test::Effects reverts to original (non-timing) behaviour here

see how it nests?? the no undoes the use inside that inner block and then when you leave the block it snaps back. lexical scoping ate and left no crumbs πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

using this module changes the default behaviour of Test::Effects's effects_ok() test. that's the whole plot. πŸ“–

normally, this test does not time the code it tests β€” unless you explicitly told it otherwise via TIME => 1 or TIME(). but if you use this module inside a code block, then effects_ok() defaults to timing its tests for the rest of that block's lexical scope. cute right?? 😌

heads up bestie: an explicit TIME => 0 option in any call to "<effects_ok()" overrides this lexical default. the explicit one always wins. no cap. πŸ‘‘

πŸŽ€ INTERFACE πŸŽ€

use Test::Effects::TIME;

effects_ok defaults to timing the code it tests within the rest of the current lexical scope. turn it ON, bestie. ⏱️

no Test::Effects::TIME;

effects_ok defaults to not timing the code it tests within the rest of the current lexical scope. turn it OFF, we're chilling. 😴


🩺 DIAGNOSTICS 🩺

none. absolutely zero drama. no errors, no warnings, just vibes. πŸ™ˆ


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

Test::Effects::TIME requires no configuration files and no environment variables. nothing to set up, nothing to export, nothing to configure. it just works. slay. ✨


πŸ“¦ DEPENDENCIES πŸ“¦

  • requires Perl 5.14 (or better). πŸͺ
  • does not require, but is meaningless without, the Test::Effects module. like, it needs its bestie to function, fr fr. 🫢

🚫 INCOMPATIBILITIES 🚫

none reported. everybody plays nice. 🌈


πŸ› BUGS AND LIMITATIONS πŸ›

no bugs have been reported. she's flawless, your honor. πŸ‘‘

please report any bugs or feature requests to bug-lib-test-effects@rt.cpan.org, or through the web interface at <http://rt.cpan.org>.


πŸ‘‘ AUTHOR πŸ‘‘

Damian Conway "<DCONWAY@cpan.org>" β€” the main character who wrote this. πŸ’«


Copyright (c) 2012, Damian Conway "<DCONWAY@cpan.org>". 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. 🎨


πŸ’€ DISCLAIMER OF WARRANTY πŸ’€

okay so this part is ALL CAPS because it's the serious legal bit, and i'm keeping every word because it matters. read it, bestie. it's important. 🫑

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.


and that's the whole page, bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

this iconic lil doc came to you via perl v5.36.0, dated 2023-07-17, and it lives under Test::...s::TIME(3pm) in the User Contributed Perl Documentation. go forth and time your tests lexically. mwah. 😘

πŸ“¦ where this page comes from