Joerg Meltzer > ToolSet-y-0.01 > ToolSet::y

Download:
ToolSet-y-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

ToolSet::y - -My one-liner ToolSet

SYNOPSIS ^

   # get super productive and install this module as package "y" via ./Build install_short

   # using Class::AutoUse ':superloader'
   perl -MToolSet::y -e '$i=Net::IP->new("193.0.1/24"); say $i->ip'

   # Package::Alias aliased Statistics::Descriptive::Full -> SDF
   perl -MToolSet::y -e '$s=SDF->new;$s->add_data(0 .. 10); print $s->variance'

   # perl 5.10 features + Scalar::Util
   perl -MToolSet::y -e 'given ($ARGV[0]) { when (looks_like_number($_)) {say "looks like a number"}}' 2E42

   # Package::Alias aliased File::ReadBackwards -> FRB
   perl -MToolSet::y -e '$r=FRB->new($INC{"y.pm"}); print while(defined ($_=$r->readline))'

   # List::Pairwise unfortunately no autouse possible
   perl -MToolSet::y -e '%lc_keys = mapp {"\L$a"=>$b} (A => 1, B => 2, C => 3); say "@$_" for pair %lc_keys'

   # File::Find::Rule + Env shortcut
   perl -MToolSet::y -e'say for FFR->name("*.pm")->in("$HOME/lib")'

DESCRIPTION ^

ToolSet::y.pm is richly packed ToolSet, it excessivly uses autouse and Class::Autouse and loads commonly used perlmodules and OO Modules on demand. Because of its excessive magic it is not recommended, that you use it anywhere else except for quickndirty one-liners.

That beeing said, welcome new age of productivity.

BUGS AND LIMITATIONS ^

There are some limitations on Class::Autouse. t/02-dumper.t complains about deprecated AUTOLOADING in main::02-dumper.t when warnings are enabled.

I have no desire to analyse this, but I would appreciate a fix if you send it to me :-)

Examples in the synopsis only work when the modules used are installed. With all the autouse stuff errors may pop up later at runtime.

DBI when Class::Autouse'd gives some strange "Can't locate DBD/Switch/dr_mem.pm" warnings. So some bugs can still lurk here.

Please report any bugs or feature requests to bug-toolset-y@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

   codeacrobat, C<< <joerg{at}joergmeltzer.de> >>

   Please share your favorite one-liner modules with me.
   You can also find me on http://twitter.com/perloneliner

COPYRIGHT & LICENSE ^

Copyright 2009 codeacrobat, all rights reserved.

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

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: