Quote::Reference - Create array refs with qwr(...), hash refs with qhr{...}
use Quote::Reference; # Set $foo = ['this','is','an','array','reference']; my $foo = qwr( this is an array reference ); # Set $bar = { # 'red' => 'FF0000', # 'green' => '00FF00', # 'blue' => '0000FF' # } my $bar = qhr{ red FF0000 green 00FF00 blue 0000FF };
This module uses source filtering to allow creating hash and array references just as easily and clean as using qw(...).
The following new quotelike operators are created:
This behaves in the same way as qw(...) except that it returns an array reference instead of a list.
Mnemonic: qw that returns a reference
This behaves in the same way as qw(...) except that it returns a hash reference instead of a list.
Mnemonic: quote for hash references
Since this module is based on source filtering, if you have the strings 'qwr' or 'qhr' anywhere in your code, you will get unexpected results.
I originally created this module as an experiment to familiarize myself with creating a CPAN module. With that in mind, I chose something silly and limited in scope. I don't expect anyone'll actually use it. :)
Anthony Kilna, <anthony at kilna.com> - http://anthony.kilna.com
<anthony at kilna.com>
Please report any bugs or feature requests to bug-quote-reference at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Quote-Reference. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-quote-reference at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Quote::Reference
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Quote-Reference
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Quote-Reference
CPAN Ratings
http://cpanratings.perl.org/d/Quote-Reference
Search CPAN
http://search.cpan.org/dist/Quote-Reference
Copyright 2012 Kilna Companies.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Quote::Reference, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quote::Reference
CPAN shell
perl -MCPAN -e shell install Quote::Reference
For more information on module installation, please visit the detailed CPAN module installation guide.