I have created a filesystem-agnostic solution in Module::Pod (soon to be published) at [email protected]:dmaestro/Module-Pod.git
use Module::Pod;
# Get all Pod::Block::* objects in the module, from its own $=pod
my @pod = pod-from-module(<My::Module>);
Pros:
- No direct EVALS of file code (even within Module::Pod)
- Uses CompUnit::Repository and kin to locate the module
- May be used with or without
use
-ing the module for other purposes in your code
- If module is already loaded, you may call with its Type Object
Cons:
- Module uses nqp: methods directly, as in Pod::Convenience (maybe not really a con?)
- Not able to retrieve pod from *.pod files
Intended for use in Pod6-checking tests, etc.