Subject: | Proposal for has_pod() function |
A humble proposal for a has_pod() function returning 1 if the module/script has some pod imbedded, and 0 otherwise:
=item has_pod
$mod->has_pod()
Returns true if pod documentation is detected within the module,
false otherwise.
=cut
sub Module::Info::has_pod
{
my $self = shift;
my $file;
open $file, $self->file
or return 0; # the file won't even open
while( <$file> )
{
return 1 if /^=[a-z]/;
}
return 0;
}