Test::...t::File(3pm)

πŸ“¦
version 1.62 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Test::Reporter::Transport::File β€” the manual (perl, 3pm, user-contributed Perl documentation, bestie) πŸ’–

okay so. picture this: you're on a plane, no wifi, no signal, nothing, and you STILL gotta file your bug report. that's literally what this module is for. it's Test::Reporter::Transport::File, and it's the File transport for Test::Reporter. yes queen, we're saving to disk. πŸ¦‹


✨ VERSION ✨

version 1.62 β€” she's serving, she's current πŸ’…


✨ SYNOPSIS ✨

my $report = Test::Reporter->new(
    transport => 'File',
    transport_args => [ $dir ],
);

look at that. transport => 'File', transport_args => [ $dir ]. that's it. that's the whole vibe. πŸŽ€


✨ DESCRIPTION ✨

so basically this module takes a Test::Reporter report and saves it into the directory you picked β€” and it does that by using the "write" method from Test::Reporter. no cap, that's the whole job.

the way this is iconic for offline operation?? you can stash your reports while you're offline, and then later β€” whenever you're back β€” upload them using "Test::Reporter->read()". bestie it's giving save-your-work energy. πŸ™ˆ

Test::Reporter->new->read( $file )->send();

so you read the file back and send it. slay. ✨


✨ USAGE ✨

for the general how-to, go peek at Test::Reporter and Test::Reporter::Transport. they got the broad strokes, i got the File-specific tea. πŸ“

🌸 Transport Arguments 🌸

$report->transport_args( $dir );

this transport class must have a writeable directory as its argument. like, it's not optional, it's not a suggestion, that's the requirement. <pink>$dir</pink> and she better be writeable or we're not going anywhere. πŸ’œ


✨ METHODS ✨

⚠️ heads up bestie: these methods are only for internal use by Test::Reporter. like, they're not for you to call directly. i'm telling you the facts because that's my job, but stay in your lane, queen. πŸ‘‘

πŸŽ€ new πŸŽ€

my $sender = Test::Reporter::Transport::File->new( $dir );

the "new" method is the object constructor. it makes the thing. that's what constructors do. πŸ’…

πŸŽ€ send πŸŽ€

$sender->send( $report );

the "send" method transmits the report. 🌈


✨ AUTHORS ✨

giving credit where credit is due, because these legends built this:

  • Adam J. Foxson <afoxson@pobox.com>
  • David Golden <dagolden@cpan.org>
  • Kirrily "Skud" Robert <skud@cpan.org>
  • Ricardo Signes <rjbs@cpan.org>
  • Richard Soderberg <rsod@cpan.org>
  • Kurt Starsinic <Kurt.Starsinic@isinet.com>

six whole authors. main character energy across the board. πŸ‘‘βœ¨


This software is copyright (c) 2015 by Authors and Contributors. 🫢

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. πŸ’–


and that's the whole page, bestie!! 🌸 this little beauty came from the User Contributed Perl Documentation pages, shipped with perl v5.34.0, dated 2022-06-28. go forth and save your reports offline, you absolute legend. iykyk πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from