孙海军 > App-moduleshere-0.08 > App::moduleshere

Download:
App-moduleshere-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.08   Source  

NAME ^

App::moduleshere - copy modules(.pm) to cwd or somewhere

SYNOPSIS ^

    mhere Carp                                    # copy Carp.pm in @INC to cwd
    mhere -r Carp                                 # copy Carp and all under it.
    mhere Carp CGI                                # copy both Carp.pm and CGI.pm
    APP_MODULES_HERE=outlib mhere Carp            # copy to outlib dir in cwd
    mhere -l outlib Carp                          # ditto
    APP_MODULES_HERE=/tmp/ mhere Carp             # copy to /tmp/
    mhere -l /tmp/ Carp                           # ditto

DESCRIPTION ^

This small script(mhere) helps you copy modules to somewhere you like. The precedence order is: -l, env APP_MODULES_HERE and cwd. By default, it will copy to cwd.

It's first written when I tried to trace a bug in one of my modules which led me to another module(let's call it Foo here) in @INC.

So I ran perldoc -l Foo to find its path, edited it to add more debug info, forced save it(happy that I had the write permission), then reproduced the bug to go on debugging, and so on.

After fixed the bug, I was happy and decided to do something else, I almost forgot that I changed Foo before! (believe me, I totally forgot it a couple of times) So I switched to Foo, reversed all changed I've made, and forced save it again.

That was a bad experience so I decided to make a new approach. that is, to copy relative modules to current working directory and make changes there. after all done we can just remove it with a clean, untouched @INC. The new one is better, at least for me, wish it can help you too :)

BUGS AND LIMITATIONS ^

No bugs have been reported.

AUTHOR ^

sunnavy sunnavy@bestpractical.com

LICENCE AND COPYRIGHT ^

Copyright 2010-2011 Best Practical Solutions.

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

syntax highlighting: