Skip to content

Commit

Permalink
Improve structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Altai-man committed May 17, 2019
1 parent 659178e commit a40259a
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions doc/Type/Backtrace.pod6
Expand Up @@ -77,16 +77,20 @@ Defined as:
Returns a summary string representation of the backtrace, filtered
by C<!.is-hidden && (.is-routine || !.is-setting)>.
this program:
This program:
sub inner { say Backtrace.new.summary }
sub outer { inner; }
outer;
results in:
in method new at SETTING::src/core/Backtrace.pm6 line 85
in sub inner at test.p6 line 1
in sub outer at test.p6 line 2
in block <unit> at test.p6 line 3
results in:
=for code :lang<text>
in method new at SETTING::src/core/Backtrace.pm6 line 85
in sub inner at test.p6 line 1
in sub outer at test.p6 line 2
in block <unit> at test.p6 line 3
=head2 method concise
Expand All @@ -97,14 +101,17 @@ Defined as:
Returns a concise string representation of the backtrace, filtered
by C<!.is-hidden && .is-routine && !.is-setting>.
this program:
This program:
sub inner { say Backtrace.new.concise }
sub outer { inner; }
outer;
results in:
in sub inner at test.p6 line 1
in sub outer at test.p6 line 2
results in:
=for code :lang<text>
in sub inner at test.p6 line 1
in sub outer at test.p6 line 2
=head2 method map
Expand All @@ -114,18 +121,21 @@ Defined as:
It invokes &code for each element and gathers the return values in a sequence and returns it.
this program:
This program:
sub inner { Backtrace.new.map({ say "{$_.file}: {$_.line}" }); }
sub outer { inner; }
outer;
results in:
SETTING::src/core/Backtrace.pm6: 85
SETTING::src/core/Backtrace.pm6: 85
test.p6: 1
test.p6: 2
test.p6: 3
test.p6: 1
results in:
=for code :lang<text>
SETTING::src/core/Backtrace.pm6: 85
SETTING::src/core/Backtrace.pm6: 85
test.p6: 1
test.p6: 2
test.p6: 3
test.p6: 1
=head2 method flat
Expand All @@ -137,4 +147,4 @@ Returns the backtrace same as L<list|#method_list>.
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

0 comments on commit a40259a

Please sign in to comment.