ARGV-URL

 view release on metacpan or  search on metacpan

lib/ARGV/URL.pm  view on Meta::CPAN

use strict;
use warnings;

package ARGV::URL;
{
  $ARGV::URL::VERSION = '0.93';
}

sub import
{
    # Inspired from L<perlopentut>
    @ARGV = map { m#^[a-z]{2,}://# ? qq#lwp-request -m GET "$_" |# : $_ } @ARGV;
}

1;

=head1 NAME

ARGV::URL - Wrap URLs from @ARGV for fetching and content consumption with <>

t/00-compile.t  view on Meta::CPAN


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;



( run in 0.263 second using v1.01-cache-2.11-cpan-4d50c553e7e )