Fix issue #476 #184

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

mpeters commented Mar 31, 2012

If we don't have a NAME section in the POD and it's a .pod file
we can autogenerate a name based on the file path. So that
something like My/Project/Tutorial.pod becomes My::Project::Tutorial.
This fixes issue #476

@mpeters mpeters If we don't have a NAME section in the POD and it's a .pod file
we can autogenerate a name based on the file path. So that
something like My/Project/Tutorial.pod becomes My::Project::Tutorial.
This fixes issue #476
fb1d2cd
Owner

oalders commented Apr 1, 2012

Thanks very much for this! Based on the work you did yesterday, I'm thinking we may want to tweak this a bit to deal with modules which aren't in found in a lib folder. What do you think?

Contributor

mpeters commented Apr 1, 2012

It should work for anything that ends in .pod. It just strips off anything that has a lib/ prefix since that's pretty common. Are there other prefixes that should be considered too?

Member

monken commented Apr 4, 2012

@mpeters I can think of pod/ docs/ etc.
maybe do
$section =~ s{^[a-z]+/}{}; ?

Owner

oalders commented Dec 21, 2013

I think we just need to fix up this patch and apply it. For reference, the issue it fixes is in the metacpan-web issues: CPAN-API/metacpan-web#476

Owner

rwstauner commented Dec 22, 2013

lib/ would be fine, pod/ and docs/ probably ok, too...
^[a-z]+/ is a bit liberal, but in this case it's probably sufficient.
If this is just for pod docs that don't have a NAME,
then if we strip off too much path i say let the author fix their doc.

This looks like a good start.

ranguard referenced this pull request in metacpan/metacpan-web Dec 23, 2013

Closed

The HTML title for a .pod document displays "Search the CPAN" #476

Owner

oalders commented Mar 15, 2014

Closing this via #303

oalders closed this Mar 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment