2011年9月8日星期四

Using this to find the depending module in a quick and dirty way

basedon ()
{
    pmpath $* | perl -MList::MoreUtils=uniq -lne 'BEGIN{$m=shift} print for sort map {($_)=$_=~m{(.*)}} uniq grep {!m{$m}} qx(grep -h ^use.*:: @{[s{\.pm$}{} && $_]}/*.pm)' $*
}

$ basedon XML::XSH2
use File::Spec;
use File::Temp qw(tempfile tempdir);
use Filter::Simple;
use IO::File;
use Module::Compile -base;
use Parse::RecDescent;
use Scalar::Util;
use Tie::Scalar;
use URI::file;
use XML::LibXML::Iterator;
use XML::LibXML::NodeList;
use XML::LibXML;
use base qw(XML::LibXML::Iterator);

$ basedon XML::LibXML
use IO::File;
use XML::SAX::Base;
use base qw(XML::SAX::Base);

Posted via email from purl's posterous

没有评论: