URI-FromHash-0.04/0000775000175000017500000000000012157346446013457 5ustar autarchautarchURI-FromHash-0.04/MANIFEST0000644000175000017500000000045612157346446014613 0ustar autarchautarchChanges INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/URI/FromHash.pm t/00-compile.t t/author-pod-spell.t t/release-cpan-changes.t t/release-eol.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-linkcheck.t t/release-pod-no404s.t t/release-pod-syntax.t t/uri.t URI-FromHash-0.04/t/0000775000175000017500000000000012157346446013722 5ustar autarchautarchURI-FromHash-0.04/t/release-no-tabs.t0000644000175000017500000000045012157346446017065 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::NoTabs'; plan skip_all => 'Test::NoTabs required' if $@; all_perl_files_ok(); URI-FromHash-0.04/t/author-pod-spell.t0000644000175000017500000000077012157346446017310 0ustar autarchautarch BEGIN { unless ($ENV{AUTHOR_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for testing by the author'); } } use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006000 eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ TT canonicalized schemeless DROLSKY DROLSKY's Rolsky Rolsky's Dave autarch lib URI FromHash URI-FromHash-0.04/t/release-pod-linkcheck.t0000644000175000017500000000077512157346446020247 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } URI-FromHash-0.04/t/release-eol.t0000644000175000017500000000047612157346446016311 0ustar autarchautarch BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); URI-FromHash-0.04/t/release-pod-syntax.t0000644000175000017500000000045012157346446017630 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); URI-FromHash-0.04/t/00-compile.t0000644000175000017500000000312612157346446015754 0ustar autarchautarch#!perl use strict; use warnings; use Test::More; use File::Find; use File::Temp qw{ tempdir }; my @modules; find( sub { return if $File::Find::name !~ /\.pm\z/; my $found = $File::Find::name; $found =~ s{^lib/}{}; $found =~ s{[/\\]}{::}g; $found =~ s/\.pm$//; # nothing to skip push @modules, $found; }, 'lib', ); sub _find_scripts { my $dir = shift @_; my @found_scripts = (); find( sub { return unless -f; my $found = $File::Find::name; # nothing to skip open my $FH, '<', $_ or do { note( "Unable to open $found in ( $! ), skipping" ); return; }; my $shebang = <$FH>; return unless $shebang =~ /^#!.*?\bperl\b\s*$/; push @found_scripts, $found; }, $dir, ); return @found_scripts; } my @scripts; do { push @scripts, _find_scripts($_) if -d $_ } for qw{ bin script scripts }; my $plan = scalar(@modules) + scalar(@scripts); $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); { # fake home for cpan-testers # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 ); like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) for sort @modules; SKIP: { eval "use Test::Script 1.05; 1;"; skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; foreach my $file ( @scripts ) { my $script = $file; $script =~ s!.*/!!; script_compiles( $file, "$script script compiles" ); } } } URI-FromHash-0.04/t/release-pod-no404s.t0000644000175000017500000000076512157346446017342 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_NO404S AUTOMATED_TESTING ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::No404s"; if ( $@ ) { plan skip_all => 'Test::Pod::No404s required for testing POD'; } else { all_pod_files_ok(); } URI-FromHash-0.04/t/release-pod-coverage.t0000644000175000017500000000076512157346446020106 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); URI-FromHash-0.04/t/release-cpan-changes.t0000644000175000017500000000052112157346446020050 0ustar autarchautarch#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); URI-FromHash-0.04/t/uri.t0000644000175000017500000001017012157346446014703 0ustar autarchautarchuse strict; use warnings; use Test::More 0.88; use URI::FromHash qw( uri uri_object ); { my $uri = uri_object( scheme => 'http', host => 'example.com', ); isa_ok( $uri, 'URI', 'uri_object() returns a URI object' ); is( $uri->scheme, 'http', 'scheme is http' ); } { my $uri = uri( scheme => 'http', host => 'example.com', ); is( $uri, 'http://example.com/', 'uri is http://example.com/' ); } { my $uri = uri( scheme => 'http', host => 'example.com', path => '/foo/bar', ); is( $uri, 'http://example.com/foo/bar', 'uri is http://example.com/foo/bar' ); } { my $uri = uri( scheme => 'http', host => 'example.com', query => { a => 1, b => 'foo' }, ); like( $uri, qr{^http://example.com\?}, 'uri starts with http://example.com?' ); like( $uri, qr{\?(?:a=1;b=foo)|(?:b=foo;a=1)}, 'contains expected query elements' ); } { my $uri = uri( scheme => 'http', host => 'example.com', query => { a => 1, b => 'foo' }, query_separator => '|', ); like( $uri, qr{^http://example.com\?}, 'uri starts with http://example.com?' ); like( $uri, qr{\?(?:a=1|b=foo)|(?:b=foo|a=1)}, 'contains expected query elements' ); } { my $uri = uri( scheme => 'http', host => 'example.com', fragment => 'frag', ); is( $uri, 'http://example.com/#frag', 'uri is http://example.com/#frag' ); } { my $uri = uri( scheme => 'http', host => 'example.com', username => 'bubba', password => 'secret', ); is( $uri, 'http://bubba:secret@example.com/', 'uri is http://bubba:secret@example.com/' ); } { my $uri = uri( scheme => 'http', host => 'example.com', port => 8080 ); is( $uri, 'http://example.com:8080/', 'uri is http://example.com:8080/' ); } { my $uri = uri( scheme => 'http', host => 'example.com', query => { a => [ 1, 2 ] }, ); like( $uri, qr{\?(?:a=1;a=2)|(?:a=2;a=1)}, 'contains expected query elements' ); } { my $uri = uri( path => '/my/path', query => { foo => 'seven' }, ); is( $uri, '/my/path?foo=seven', 'uri is /my/path?foo=seven' ); } { my $uri = uri( scheme => 'http', host => 'example.com', username => 'bubba', ); is( $uri, 'http://bubba:@example.com/', 'uri is http://bubba:@example.com/' ); } { my $uri = uri( scheme => 'http', host => 'example.com', username => 'bubba', ); is( $uri, 'http://bubba:@example.com/', 'uri is http://bubba:@example.com/' ); } { eval { uri( port => 70, username => 'test' ) }; like( $@, qr/required parameters/, 'got an error when none of the required params were given' ); } { eval { uri( path => [], username => 'test' ) }; like( $@, qr/required parameters/, 'got an error when none of the required params were given' ); } { my $uri = uri( scheme => 'http', host => 'example.com', path => [qw( a b c )], ); is( $uri, 'http://example.com/a/b/c', 'uri is http://example.com/a/b/c' ); } { my $uri = uri( scheme => 'http', host => 'example.com', path => [ qw( a b c ), '' ], ); is( $uri, 'http://example.com/a/b/c/', 'uri is http://example.com/a/b/c/' ); } { my $uri = uri( path => [qw( a b c )], ); is( $uri, 'a/b/c', 'uri is a/b/c' ); } { my $uri = uri( path => [ '', qw( a b c ), '' ], ); is( $uri, '/a/b/c/', 'uri is /a/b/c/' ); } { my $uri = uri( path => [ '', qw( a b c ), undef, 'q', '' ], ); is( $uri, '/a/b/c/q/', 'uri is /a/b/c/' ); } done_testing(); URI-FromHash-0.04/lib/0000775000175000017500000000000012157346446014225 5ustar autarchautarchURI-FromHash-0.04/lib/URI/0000775000175000017500000000000012157346446014664 5ustar autarchautarchURI-FromHash-0.04/lib/URI/FromHash.pm0000644000175000017500000001360512157346446016734 0ustar autarchautarchpackage URI::FromHash; { $URI::FromHash::VERSION = '0.04'; } BEGIN { $URI::FromHash::AUTHORITY = 'cpan:DROLSKY'; } use strict; use warnings; use Params::Validate qw( validate SCALAR ARRAYREF HASHREF ); use URI; use URI::QueryParam; use Exporter qw( import ); our @EXPORT_OK = qw( uri uri_object ); my %BaseParams = ( scheme => { type => SCALAR, optional => 1 }, username => { type => SCALAR, optional => 1 }, password => { type => SCALAR, default => '' }, host => { type => SCALAR, optional => 1 }, port => { type => SCALAR, optional => 1 }, path => { type => SCALAR | ARRAYREF, optional => 1 }, query => { type => HASHREF, default => {} }, fragment => { type => SCALAR, optional => 1 }, ); sub uri_object { my %p = validate( @_, \%BaseParams ); _check_required( \%p ); my $uri = URI->new(); $uri->scheme( $p{scheme} ) if grep { defined && length } $p{scheme}; if ( grep { defined && length } $p{username}, $p{password} ) { $p{username} ||= ''; $p{password} ||= ''; if ( $uri->can('user') && $uri->can('password') ) { $uri->user( $p{username} ); $uri->password( $p{password} ); } else { $uri->userinfo("$p{username}:$p{password}"); } } for my $k (qw( host port )) { $uri->$k( $p{$k} ) if grep { defined && length } $p{$k}; } if ( $p{path} ) { if ( ref $p{path} ) { $uri->path( join '/', grep { defined } @{ $p{path} } ); } else { $uri->path( $p{path} ); } } while ( my ( $k, $v ) = each %{ $p{query} } ) { $uri->query_param( $k => $v ); } $uri->fragment( $p{fragment} ) if grep { defined && length } $p{fragment}; return $uri; } { my $spec = { %BaseParams, query_separator => { type => SCALAR, default => ';' }, }; sub uri { my %p = validate( @_, $spec, ); _check_required( \%p ); my $sep = delete $p{query_separator}; my $uri = uri_object(%p); if ( $sep ne '&' && $uri->query() ) { my $query = $uri->query(); $query =~ s/&/$sep/g; $uri->query($query); } # force stringification return $uri->canonical() . ''; } } sub _check_required { my $p = shift; return if ( grep { defined and length } map { $p->{$_} } qw( host fragment ) ); return if ref $p->{path} ? @{ $p->{path} } : defined $p->{path} && length $p->{path}; return if keys %{ $p->{query} }; require Carp; local $Carp::CarpLevel = 1; Carp::croak( 'None of the required parameters ' . '(host, path, fragment, or query) were given' ); } 1; # ABSTRACT: Build a URI from a set of named parameters __END__ =pod =head1 NAME URI::FromHash - Build a URI from a set of named parameters =head1 VERSION version 0.04 =head1 SYNOPSIS use URI::FromHash qw( uri ); my $uri = uri( path => '/some/path', query => { foo => 1, bar => 2 }, ); =head1 DESCRIPTION This module provides a simple one-subroutine "named parameters" style interface for creating URIs. Underneath the hood it uses C, though because of the simplified interface it may not support all possible options for all types of URIs. It was created for the common case where you simply want to have a simple interface for creating syntactically correct URIs from known components (like a path and query string). Doing this using the native C interface is rather tedious, requiring a number of method calls, which is particularly ugly when done inside a templating system such as Mason or TT2. =head1 FUNCTIONS This module provides two functions both of which are I exportable: =head2 uri( ... ) and uri_object( ... ) Both of these functions accept the same set of parameters, except for one additional parameter allowed when calling C. The C function simply returns a string representing a canonicalized URI based on the provided parameters. The C function returns new a C object based on the given parameters. These parameters are: =over 4 =item * scheme The URI's scheme. This is optional, and if none is given you will create a schemeless URI. This is useful if you want to create a URI to a path on the same server (as is commonly done in C<< >> tags). =item * host =item * port =item * path The path can be either a string or an array reference. If an array reference is passed each I member of the array will be joined by a single forward slash (/). If you are building a host-less URI and want to include a leading slash then make the first element of the array reference an empty string (C<''>). You can add a trailing slash by making the last element of the array reference an empty string. =item * username =item * password =item * fragment All of these are optional strings which can be used to specify that part of the URI. =item * query This should be a hash reference of query parameters. The values for each key may be a scalar or array reference. Use an array reference to provide multiple values for one key. =item * query_separator This option is can I be provided when calling C. By default, it is a semi-colon (;). =back =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2013 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut URI-FromHash-0.04/README0000644000175000017500000000037712157346446014344 0ustar autarchautarch This archive contains the distribution URI-FromHash, version 0.04: Build a URI from a set of named parameters This software is Copyright (c) 2013 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) URI-FromHash-0.04/LICENSE0000644000175000017500000002152012157346446014462 0ustar autarchautarchThis software is Copyright (c) 2013 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. URI-FromHash-0.04/META.yml0000644000175000017500000000143012157346446014724 0ustar autarchautarch--- abstract: 'Build a URI from a set of named parameters' author: - 'Dave Rolsky ' build_requires: File::Find: 0 File::Temp: 0 Test::More: 0.88 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: URI-FromHash requires: Carp: 0 Exporter: 0 Params::Validate: 0 URI: 0 URI::QueryParam: 0 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=URI-FromHash homepage: http://metacpan.org/release/URI-FromHash repository: git://git.urth.org/URI-FromHash.git version: 0.04 x_authority: cpan:DROLSKY URI-FromHash-0.04/Makefile.PL0000644000175000017500000000305012157346446015425 0ustar autarchautarch use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Build a URI from a set of named parameters", "AUTHOR" => "Dave Rolsky ", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "URI-FromHash", "EXE_FILES" => [], "LICENSE" => "artistic_2", "NAME" => "URI::FromHash", "PREREQ_PM" => { "Carp" => 0, "Exporter" => 0, "Params::Validate" => 0, "URI" => 0, "URI::QueryParam" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "File::Find" => 0, "File::Temp" => 0, "Test::More" => "0.88" }, "VERSION" => "0.04", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; my $br = $WriteMakefileArgs{BUILD_REQUIRES}; for my $mod ( keys %$tr ) { if ( exists $br->{$mod} ) { $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; } else { $br->{$mod} = $tr->{$mod}; } } } unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); URI-FromHash-0.04/Changes0000644000175000017500000000051312157346446014747 0ustar autarchautarch0.04 2013-06-16 - Pod fixes. 0.03 2008-05-30 - Add missing dependency - Params::Validate. - Added support for accepting an array reference for the path. Based on a suggestion from Dave Doyle. RT #31352. 0.02 2006-02-24 - Forgot to include a dependency on URI.pm. Duh. 0.01 2006-02-24 - Initial release URI-FromHash-0.04/META.json0000644000175000017500000000330612157346446015100 0ustar autarchautarch{ "abstract" : "Build a URI from a set of named parameters", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "URI-FromHash", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Carp" : "0", "Exporter" : "0", "Params::Validate" : "0", "URI" : "0", "URI::QueryParam" : "0", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Find" : "0", "File::Temp" : "0", "Test::More" : "0.88" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-uri-fromhash@rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=URI-FromHash" }, "homepage" : "http://metacpan.org/release/URI-FromHash", "repository" : { "type" : "git", "url" : "git://git.urth.org/URI-FromHash.git", "web" : "http://git.urth.org/URI-FromHash.git" } }, "version" : "0.04", "x_authority" : "cpan:DROLSKY" } URI-FromHash-0.04/INSTALL0000644000175000017500000000167212157346446014514 0ustar autarchautarch This is the Perl distribution URI-FromHash. Installing URI-FromHash is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm URI::FromHash If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S URI::FromHash ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan URI::FromHash ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation URI-FromHash documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc URI::FromHash URI-FromHash-0.04/dist.ini0000644000175000017500000000034612157346446015124 0ustar autarchautarchname = URI-FromHash author = Dave Rolsky license = Artistic_2_0 copyright_holder = Dave Rolsky version = 0.04 [@DROLSKY] dist = URI-FromHash stopwords = TT stopwords = canonicalized stopwords = schemeless