Have I an error in my POD?

Have I an error in my POD?

am 21.12.2005 19:35:24 von Ian Stuart

I have a package in CPAN (MathML::Entities::Approximate) and when it is
installed manually, it's fine.

However when it's installed via the CPAN module (perl -MCPAN -e
shell...) there is an error about the ABSTRACT (I can't paste the exact
message in, as I've installed the package on both my systems now )

I *thought* that the abstract was deduced from the NAME line: the
element after the hyphen.... however this appears not to be the case.

I have compared my POD to other packages, and it seams to be complete.

SO:
1) What is the abstract?
2) How do I define it on my package?

Many thanks...
--
Ian

Re: Have I an error in my POD?

am 21.12.2005 23:53:14 von Ron Savage

On Thu, 22 Dec 2005 05:35:24 +1100, Ian Stuart wrote:

Hi Ian

> However when it's installed via the CPAN module (perl -MCPAN -e
> shell...) there is an error about the ABSTRACT (I can't paste the
> exact message in, as I've installed the package on both my systems
> now )

You could uninstall it, and reinstall it, though.

> I *thought* that the abstract was deduced from the NAME line: the
> element after the hyphen.... however this appears not to be the
> case.

Right. So can you post the NAME part of your POD.

> I have compared my POD to other packages, and it seams to be
> complete.

Perhaps it needs to be /(.+)\s-\s(.+)/?

Note the 2 spaces.

Re: Have I an error in my POD?

am 22.12.2005 07:11:51 von Sisyphus

"Ian Stuart"
..
..
>
> SO:
> 1) What is the abstract?

From 'perldoc ExtUtils::MakeMaker':

ABSTRACT
One line description of the module. Will be included in PPD file.

ABSTRACT_FROM
Name of the file that contains the package description. MakeMaker looks
for a line in the POD matching /^($package\s-\s)(.*)/. This is
typically the first line in the "=head1 NAME" section. $2 becomes the
abstract.

> 2) How do I define it on my package?
>

I think the need to define it should go away if you remove the
'ABSTRACT_FROM' line in your Makefile.PL. Not sure if that's the recommended
approach, but it's the one I would take. (I don't think that either ABSTRACT
or ABSTRACT_FROM are mandatory for a CPAN.pm install ... though, as I don't
use CPAN.pm, there's a chance that I'm mistaken about that. Looks to me that
they have relevance only with ppm (binary) package builds - since the "PPD"
file is part of a ppm package.)

Or ... if you replace 'ABSTRACT_FROM' in the Makefile.PL with 'ABSTRACT'
you can define the abstract then and there:

(ABSTRACT => 'Whatever you want it to be',
AUTHOR => 'Ian Stuart ') : ()),

You should then be able to leave everything else as it is.

Cheers,
Rob

Re: Have I an error in my POD?

am 22.12.2005 10:33:19 von Ian Stuart

Ron Savage wrote:
> You could uninstall it, and reinstall it, though.
Ah - I had a quick look at the help stuff, and didn't spot that.. I'll
have a play (however I don't want to upload a new version to cpan is
this is the only fix - not really a bug-fix )

>>I *thought* that the abstract was deduced from the NAME line: the
>>element after the hyphen.... however this appears not to be the
>>case.
> Right. So can you post the NAME part of your POD.
OK - straight from the .pm file:
--- start extract ---
=pod

=head1 NAME

MathML::Entities::Approximate - Returns approximated ASCII characters
for XHTML+MathML Named Entities

=head1 SYNOPSIS
---- end extract ----
> Perhaps it needs to be /(.+)\s-\s(.+)/?
>
> Note the 2 spaces.
Nope - they are there...
Hmmm... From Rob's (sisyphus) comment, looking at ExtUtils::MakeMaker:
"matching /^($package\s-\s)(.*)/ " - could the problem be the *leading*
space in the text of the NAME section?

---
Ian, Perl Laghu

Re: Have I an error in my POD?

am 24.12.2005 01:32:23 von Ron Savage

On Thu, 22 Dec 2005 20:33:19 +1100, Ian Stuart wrote:

Hi Ian

> Ah - I had a quick look at the help stuff, and didn't spot that..

OK.

> I'll have a play (however I don't want to upload a new version to
> cpan is this is the only fix - not really a bug-fix )

PITA, right?

>>> I *thought* that the abstract was deduced from the NAME line:

So did I.

> MathML::Entities::Approximate - Returns approximated ASCII
> characters for XHTML+MathML Named Entities

Looks OK, except...

> Hmmm... From Rob's (sisyphus) comment, looking at
> ExtUtils::MakeMaker: "matching /^($package\s-\s)(.*)/ " - could the
> problem be the *leading* space in the text of the NAME section?

Yes, that'd be the thing to edit.