Skip to content

Commit

Permalink
Introduced meta and package options
Browse files Browse the repository at this point in the history
  • Loading branch information
teodozjan committed Nov 24, 2015
1 parent fdc7333 commit 0dd827c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 14 additions & 3 deletions bin/pod-coverage
Expand Up @@ -3,8 +3,19 @@
use v6;
use Pod::Coverage;

sub MAIN(Str $dir = './META.info', Bool :$anypod){
for Pod::Coverage.use-meta($dir,$anypod) -> $res {
say join("\n", $res.get-results>>.gist);
multi MAIN('meta', Str $path = './META.info', Bool :$anypod) {
for Pod::Coverage.use-meta($path,$anypod) -> $res {
say-results($res);
}
}

multi MAIN('package', Str $package, Str :$toload, Str :$dir = './lib', Bool :$anypod){
my $to-load = $toload // $package;
my $res = Pod::Coverage.coverage($to-load,$package, $dir,$anypod);
say-results($res);

}

sub say-results($res){
say join("\n", $res.get-results>>.gist);
}
5 changes: 4 additions & 1 deletion lib/Pod/Coverage/Full.pm6
Expand Up @@ -8,14 +8,15 @@ unit class Pod::Coverage::Full does Pod::Tester;
#| Sometimes filename is totally out of scope. That's the reason
#| why I left C<$.toload> and C<$.packageStr> separate
has $.toload;
#| Path is for results only
has $.path;
#| P<$.toload>
has $.packageStr;


#| Normally if method is an accessor Pod::Coverage checks
#| field documentation (autogenerated accessors have no pod)
#| anyway they are often sefl documenting so checking it is
#| anyway they are often self documenting so checking it is
#| disabled as default
has Bool $.ignore-accessors is rw = True;
#|Attribute list for skipping accessor methods
Expand All @@ -28,6 +29,8 @@ method check{

#start from self
self.parse($packageO);
dd $!packageStr;
dd $packageO;
self.correct-pod($!path) if @.results;

unless @.results {
Expand Down

0 comments on commit 0dd827c

Please sign in to comment.