#!/usr/bin/env perl
#
# This file is part of App-Module-Locate
#
# This software is copyright (c) 2014 by celogeek <me@celogeek.com>.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#

# PODNAME: mlocate
# ABSTRACT: Find module locate by his name


use strict;
use warnings;
our $VERSION = '0.7'; # VERSION
use Module::Locate 'locate';

for my $module(@ARGV) {
    my $filename = locate($module);
    if (defined $filename) {
        print $filename, "\n";
    } else {
        warn "$module no found !\n";
    }
};

__END__

=pod

=head1 NAME

mlocate - Find module locate by his name

=head1 VERSION

version 0.7

=head1 SYNOPSIS

  mlocate Redis
  => ...lib/site_perl/5.14.2/Redis.pm

  Edit it :
  vim $(mlocate Redis)

  locate many file :
  mlocate Redis DBI
  => ...lib/site_perl/5.14.2/Redis.pm
  => ...lib/site_perl/5.14.2/DBI.pm

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website
https://github.com/celogeek/App-Module-Locate/issues

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

celogeek <me@celogeek.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by celogeek <me@celogeek.com>.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut