Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Pod::To::Text] Make object stringification in declarator2text less i…

…mplementation-dependent
  • Loading branch information...
commit b3e3008a2d5ae121affe65b411c897ebee2c499a 1 parent 424d2dd
@tadzik tadzik authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/Pod/To/Text.pm
View
14 lib/Pod/To/Text.pm
@@ -68,27 +68,27 @@ sub table2text($pod) {
sub declarator2text($pod) {
next unless $pod.WHEREFORE.WHY;
- my $type = do given $pod.WHEREFORE {
+ my $what = do given $pod.WHEREFORE {
when Method {
- 'method'
+ 'method ' ~ $_.name
}
when Sub {
- 'sub'
+ 'sub ' ~ $_.name
}
when nqp::p6bool(nqp::istype($_.HOW, Metamodel::ClassHOW)) {
- 'class'
+ 'class ' ~ $_.perl
}
when nqp::p6bool(nqp::istype($_.HOW, Metamodel::ModuleHOW)) {
- 'module'
+ 'module ' ~ $_.perl
}
when nqp::p6bool(nqp::istype($_.HOW, Metamodel::PackageHOW)) {
- 'package'
+ 'package ' ~ $_.perl
}
default {
''
}
}
- return "$type {$pod.WHEREFORE.perl}: {$pod.WHEREFORE.WHY.content}"
+ return "$what: {$pod.WHEREFORE.WHY.content}"
}
sub formatting2text($pod) {
Please sign in to comment.
Something went wrong with that request. Please try again.