This is certainly related to this question, but I feel it doesn't overlap, so here we go. How can I get the functionality of the following command on Ubuntu (and/or Debian as bonus):
yum whatprovides 'perl(Foo::Bar)'
Obviously I can attempt to rely on the package somehow ending up in a folder structure that resembles the namespaces in Perl, but I'm looking for something equivalent, i.e. equally brief and trivial. However, if it doesn't work as briefly on Ubuntu, I can do with a longer path and create my own function.
Please consider 10.04 or newer for this question.
If you are looking to a similar apt/dpkg function, I don't know one, but you can use this:
You can use
cpan -D module
to find basic information about a module:Then parse the module path, in my case I was lazy, you can use whatever you like to do this:
Then use command substitution:
Hope is useful to you. BTW, this requires cpan installed (which is in most of the defaults installations).