Skip to content

Commit 618a575

Browse files
authored
Revert "Update description and other documentation"
1 parent cabada6 commit 618a575

File tree

8 files changed

+14
-152
lines changed

8 files changed

+14
-152
lines changed

Changes

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
Revision history for Pod-TreeWalker
22

33
{{$NEXT}}
4-
- Enabled creation of a separate document for the Listener
5-
role from existing pod in file
6-
'lib/Pod/TreeWalker/Listener.rakumod'.
7-
- Updated copyright date in file
8-
'lib/Pod/TreeWalker/Listener.rakumod'.
9-
- Added a short example of actual use along with other
10-
README.md tweaks.
11-
- Added missing dep 'Test::Coverage' to META6.json
12-
- Adjusted Test::Coverage numbers in xt/
134

145
0.0.5 2025-05-06T11:02:12+02:00
156
- Changed trait 'is built' to 'is required' on the Listener

Listener.md

Lines changed: 0 additions & 116 deletions
This file was deleted.

META6.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"TREE"
2424
],
2525
"test-depends": [
26-
"Test::Coverage"
2726
],
2827
"version": "0.0.5"
2928
}

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,35 @@ SYNOPSIS
1111
```raku
1212
use Pod::TreeWalker;
1313

14-
my $L = My::Listener.new;
15-
my $o = Pod::TreeWalker.new: :listener($L);
16-
my @events = $o.walk-pod($=pod);
14+
my $to-html = Pod::To::HTML.new(...);
15+
Pod::TreeWalker.new( :listener($to-html) ).walk-pod($=pod);
1716
```
1817

1918
DESCRIPTION
2019
===========
2120

2221
This class provides an API for walking a pod tree (as provided by `$=pod`). Each node in the tree will trigger one or more events. These events cause methods to be called on a listener object that you provide. This lets you do something with a Pod document without having to know much about the underlying tree structure of Pod.
2322

24-
Note: Use distribution `Pod::Load` for an easy way to access the Pod from a file or a string.
25-
2623
METHODS
2724
=======
2825

2926
new
3027
---
3128

3229
```raku
33-
my $walker = Pod::TreeWalker.new: :listener($object);
30+
my $walker = Pod::TreeWalker.new( :listener($object) )
3431
```
3532

36-
The constructor requires a single named argument `:listener`. This object must implement the `Pod::TreeWalker::Listener` API as demonstrated in file './t/lib/TestListener.rakumod'. See more details in **Listener.md**.
33+
The constructor requires a single named argument `:listener`. This object must implement the [Pod::TreeWalker::Listener](./t/lib/TestListener.rakumod) API as demonstrated in file './t/lib/TestListener.rakumod'.
3734

3835
walk-pod
3936
--------
4037

4138
```raku
42-
my @events = $walker.walk-pod($pod);
39+
$walker.walk-pod($pod);
4340
```
4441

45-
This method walks through a pod tree starting with the top node in `$pod`. You can provide either an array of pod nodes (as stored in `$=pod`) or a single top-level node (such as `$=pod[0]`). The `@events` list provides the details of each pod node encountered.
42+
This method walks through a pod tree starting with the top node in `$pod`. You can provide either an array of pod nodes (as stored in `$=pod`) or a single top-level node (such as `$=pod[0]`).
4643

4744
text-content-of
4845
---------------

dist.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ filename = doc/Pod-TreeWalker.rakudoc
1515
provider = github-actions/linux.yml
1616
provider = github-actions/macos.yml
1717
provider = github-actions/windows.yml
18-
19-
[RunAfterBuild]
20-
cmd = raku --doc=Markdown lib/Pod/TreeWalker/Listener.rakumod > Listener.md

doc/Pod-TreeWalker.rakudoc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ Pod::TreeWalker - Walk a Pod tree and generate an event for each node
1010

1111
use Pod::TreeWalker;
1212

13-
my $L = My::Listener.new;
14-
my $o = Pod::TreeWalker.new: :listener($L);
15-
my @events = $o.walk-pod($=pod);
13+
my $to-html = Pod::To::HTML.new(...);
14+
Pod::TreeWalker.new( :listener($to-html) ).walk-pod($=pod);
1615

1716
=end code
1817

@@ -24,36 +23,31 @@ cause methods to be called on a listener object that you provide. This lets
2423
you do something with a Pod document without having to know much about the
2524
underlying tree structure of Pod.
2625

27-
Note: Use distribution C<Pod::Load> for an easy way to access the Pod
28-
from a file or a string.
29-
3026
=head1 METHODS
3127

3228
=head2 new
3329

3430
=begin code :lang<raku>
3531

36-
my $walker = Pod::TreeWalker.new: :listener($object);
32+
my $walker = Pod::TreeWalker.new( :listener($object) )
3733

3834
=end code
3935

4036
The constructor requires a single named argument C<:listener>. This object must
41-
implement the C<Pod::TreeWalker::Listener> API
37+
implement the L<Pod::TreeWalker::Listener|./t/lib/TestListener.rakumod> API
4238
as demonstrated in file './t/lib/TestListener.rakumod'.
43-
See more details in B<Listener.md>.
4439

4540
=head2 walk-pod
4641

4742
=begin code :lang<raku>
4843

49-
my @events = $walker.walk-pod($pod);
44+
$walker.walk-pod($pod);
5045

5146
=end code
5247

5348
This method walks through a pod tree starting with the top node in
5449
C<$pod>. You can provide either an array of pod nodes (as stored in C<$=pod>)
5550
or a single top-level node (such as C<$=pod[0]>).
56-
The C<@events> list provides the details of each pod node encountered.
5751

5852
=head2 text-content-of
5953

lib/Pod/TreeWalker/Listener.rakumod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Dave Rolsky
142142
143143
Copyright 2015 - 2018 Dave Rolsky
144144
145-
Copyright 2019 - 2025 Raku Community
145+
Copyright 2019 - 2022 Raku Community
146146
147147
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
148148

xt/coverage.rakutest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use Test::Coverage;
22

33
plan 2;
44

5-
coverage-at-least 80;
5+
coverage-at-least 81;
66

7-
uncovered-at-most 15;
7+
uncovered-at-most 14;
88

99
source-with-coverage;
1010

0 commit comments

Comments
 (0)