Langertha/Raider/Result.pm

filter: Statementstmt 100% 7 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 8 / 8 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Langertha/Raid/Sequential.pm ↑ Summary Langertha/Role/Runnable.pm »
1 package Langertha::Raider::Result;
2 # ABSTRACT: Result object from a Raider raid
3 8 our $VERSION = '0.502';
4 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 extends 'Langertha::Result';
6  
7  
8 8 __PACKAGE__->meta->make_immutable;
9  
10 8 1;
11  
12 __END__
13  
14 =pod
15  
16 =encoding UTF-8
17  
18 =head1 NAME
19  
20 Langertha::Raider::Result - Result object from a Raider raid
21  
22 =head1 VERSION
23  
24 version 0.502
25  
26 =head1 SYNOPSIS
27  
28 my $result = await $raider->raid_f('What files are here?');
29  
30 # Stringifies to text (backward compatible)
31 say $result;
32  
33 # Check result type
34 if ($result->is_final) {
35 say "Final answer: $result";
36 } elsif ($result->is_question) {
37 say "Agent asks: " . $result->content;
38 my $answer = <STDIN>;
39 my $continued = await $raider->respond_f($answer);
40 } elsif ($result->is_pause) {
41 say "Agent paused: " . $result->content;
42 my $continued = await $raider->respond_f('continue');
43 } elsif ($result->is_abort) {
44 say "Agent aborted: " . $result->content;
45 }
46  
47 =head1 DESCRIPTION
48  
49 Backward-compatible Raider-specific result class. It now subclasses
50 L<Langertha::Result> so Raider and Raid orchestration can share the same
51 result semantics.
52  
53 =head2 type
54  
55 Inherited from L<Langertha::Result>. One of C<final>, C<question>,
56 C<pause>, or C<abort>.
57  
58 =head2 text
59  
60 Inherited from L<Langertha::Result>. Final response text payload.
61  
62 =head2 content
63  
64 Inherited from L<Langertha::Result>. Question/pause/abort message.
65  
66 =head2 options
67  
68 Inherited from L<Langertha::Result>. Optional choices for question results.
69  
70 =head2 is_final
71  
72 Inherited predicate helper from L<Langertha::Result>.
73  
74 =head2 is_question
75  
76 Inherited predicate helper from L<Langertha::Result>.
77  
78 =head2 is_pause
79  
80 Inherited predicate helper from L<Langertha::Result>.
81  
82 =head2 is_abort
83  
84 Inherited predicate helper from L<Langertha::Result>.
85  
86 =head1 SUPPORT
87  
88 =head2 Issues
89  
90 Please report bugs and feature requests on GitHub at
91 L<https://github.com/Getty/langertha/issues>.
92  
93 =head2 IRC
94  
95 Join C<#langertha> on C<irc.perl.org> or message Getty directly.
96  
97 =head1 CONTRIBUTING
98  
99 Contributions are welcome! Please fork the repository and submit a pull request.
100  
101 =head1 AUTHOR
102  
103 Torsten Raudssus <getty@cpan.org>
104  
105 =head1 COPYRIGHT AND LICENSE
106  
107 This software is copyright (c) 2026 by Torsten Raudssus L<https://raudssus.de/>.
108  
109 This is free software; you can redistribute it and/or modify it under
110 the same terms as the Perl 5 programming language system itself.
111  
112 =cut
« Langertha/Raid/Sequential.pm ↑ Summary Langertha/Role/Runnable.pm »