.. my experience is that if the documentation is not next to the code, people are much less likely to read the documentation when looking at the code ..
Mmm, that's a matter of opinion. The POD should contain enough information for someone using the module to write code that uses it. If they also have to look at the code, that's a problem with the POD.
Hmm, I'm not sure I agree that my experience is a matter of opinion. :)
If someone comes to read the docs, I would usually expect that they'll use perldoc or similar. This is about people coming to look at the code.
A typical workplace example is that a developer picks up a bug report, analyses it to the point they see a method call somewhere clearly expecting some behaviour, and sees in the method that it does not implement that behaviour. They then make an assumption (effectively a guess) about whether it's the call or the implementation that is wrong, rather than determining that from the documentation of the method. Having the documentation right there when they look at the implementation is one small way to help them avoid that error.
It would be poor software craftsmanship to update the code without updating the POD.
Yes. Sadly, some human software developers are not perfect. We should do what we can to help them overcome their imperfections - to make it as easy as possible to do things right. Having docs next to the code it describes is one small way to make it easier to do things right.
In reply to Re^3: Where to place POD
by hv
in thread Where to place POD
by Bod
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |