Imported Upstream version 0.70
gregor herrmann
8 years ago
0 | 0 | Revision history for Perl extension Net::OpenSSH. |
1 | 1 | |
2 | 0.70 Jan 20, 2016 | |
3 | - Re-release as stable. | |
4 | ||
5 | 0.69_01 Jan 14, 2016 | |
6 | - Add fish.pm to MANIFEST (bug reported by Erik Ferguson). | |
7 | ||
2 | 8 | 0.68 Dec 20, 2015 |
3 | - Rerelease as stable | |
9 | - Rerelease as stable. | |
4 | 10 | |
5 | 11 | 0.67_02 Dec 4, 2015 |
6 | 12 | - Do not croak when a method gets an unknown argument as far |
7 | as its value is undef | |
13 | as its value is undef. | |
8 | 14 | |
9 | 15 | 0.67_01 Nov 7, 2015 |
10 | 16 | - fix internal waitpid usage (bug report by Konrad |
11 | 11 | lib/Net/OpenSSH/ShellQuoter.pm |
12 | 12 | lib/Net/OpenSSH/ShellQuoter/POSIX.pm |
13 | 13 | lib/Net/OpenSSH/ShellQuoter/csh.pm |
14 | lib/Net/OpenSSH/ShellQuoter/fish.pm | |
14 | 15 | lib/Net/OpenSSH/ShellQuoter/MSWin.pm |
15 | 16 | lib/Net/OpenSSH/ShellQuoter/MSCmd.pm |
16 | 17 | lib/Net/OpenSSH/ShellQuoter/Chain.pm |
3 | 3 | "Salvador Fandino <sfandino@yahoo.com>" |
4 | 4 | ], |
5 | 5 | "dynamic_config" : 1, |
6 | "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640", | |
6 | "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005", | |
7 | 7 | "license" : [ |
8 | "unknown" | |
8 | "perl_5" | |
9 | 9 | ], |
10 | 10 | "meta-spec" : { |
11 | 11 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", |
41 | 41 | "url" : "https://github.com/salva/p5-Net-OpenSSH" |
42 | 42 | } |
43 | 43 | }, |
44 | "version" : "0.68" | |
44 | "version" : "0.70", | |
45 | "x_serialization_backend" : "JSON::PP version 2.27300" | |
45 | 46 | } |
6 | 6 | configure_requires: |
7 | 7 | ExtUtils::MakeMaker: '0' |
8 | 8 | dynamic_config: 1 |
9 | generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640' | |
10 | license: unknown | |
9 | generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005' | |
10 | license: perl | |
11 | 11 | meta-spec: |
12 | 12 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
13 | 13 | version: '1.4' |
20 | 20 | Test::More: '0' |
21 | 21 | resources: |
22 | 22 | repository: https://github.com/salva/p5-Net-OpenSSH |
23 | version: '0.68' | |
23 | version: '0.70' | |
24 | x_serialization_backend: 'CPAN::Meta::YAML version 0.012' |
37 | 37 | WriteMakefile( NAME => 'Net::OpenSSH', |
38 | 38 | VERSION_FROM => 'lib/Net/OpenSSH.pm', |
39 | 39 | ABSTRACT_FROM => 'lib/Net/OpenSSH.pm', |
40 | LICENSE => 'perl_5', | |
40 | 41 | PREREQ_PM => { Test::More => 0, }, |
41 | 42 | AUTHOR => 'Salvador Fandino <sfandino@yahoo.com>', |
42 | 43 | META_MERGE => { |
25 | 25 | |
26 | 26 | COPYRIGHT AND LICENCE |
27 | 27 | |
28 | Copyright (C) 2008-2015 by Salvador Fandino | |
28 | Copyright (C) 2008-2016 by Salvador Fandino | |
29 | 29 | |
30 | 30 | This library is free software; you can redistribute it and/or modify |
31 | 31 | it under the same terms as Perl itself, either Perl version 5.10.0 or, |
0 | package Net::OpenSSH::ShellQuoter::fish; | |
1 | ||
2 | use strict; | |
3 | use warnings; | |
4 | use Carp; | |
5 | ||
6 | sub new { __PACKAGE__ } | |
7 | ||
8 | my $noquote_class = '.\\w/\\-@,:'; | |
9 | my $glob_class = '*?\\[\\],\\{\\}:!^~'; | |
10 | ||
11 | sub quote { | |
12 | my $quoted = $_[1]; | |
13 | return $quoted if $quoted =~ /\A[$noquote_class]+\z/o; | |
14 | $quoted =~ s/([\'\\])/\\$1/g; | |
15 | "'$quoted'" | |
16 | } | |
17 | ||
18 | sub quote_glob { | |
19 | shift; | |
20 | my $arg = shift; | |
21 | my @parts; | |
22 | while ((pos $arg || 0) < length $arg) { | |
23 | if ($arg =~ m|\G('+)|gc) { | |
24 | push @parts, (length($1) > 1 ? "\"$1\"" : "\\'"); | |
25 | } | |
26 | elsif ($arg =~ m|\G([$noquote_class$glob_class]+)|gco) { | |
27 | push @parts, $1; | |
28 | } | |
29 | elsif ($arg =~ m|\G(\\[$glob_class\\])|gco) { | |
30 | push @parts, $1; | |
31 | } | |
32 | elsif ($arg =~ m|\G\\|gc) { | |
33 | push @parts, '\\\\' | |
34 | } | |
35 | elsif ($arg =~ m|\G([^$glob_class\\']+)|gco) { | |
36 | push @parts, "'$1'"; | |
37 | } | |
38 | else { | |
39 | require Data::Dumper; | |
40 | $arg =~ m|\G(.+)|gc; | |
41 | die "Internal error: unquotable string:\n". Data::Dumper::Dumper($1) ."\n"; | |
42 | } | |
43 | } | |
44 | my $quoted = join('', @parts); | |
45 | length $quoted ? $quoted : "''"; | |
46 | } | |
47 | ||
48 | my %fragments = ( stdin_discard => '</dev/null', | |
49 | stdout_discard => '>/dev/null', | |
50 | stderr_discard => '2>/dev/null', | |
51 | stdout_and_stderr_discard => '>/dev/null 2>&1', | |
52 | stderr_to_stdout => '2>&1' ); | |
53 | ||
54 | sub shell_fragments { | |
55 | shift; | |
56 | my @f = grep defined, @fragments{@_}; | |
57 | wantarray ? @f : join(' ', @f); | |
58 | } | |
59 | ||
60 | 1; |
0 | 0 | package Net::OpenSSH; |
1 | 1 | |
2 | our $VERSION = '0.68'; | |
2 | our $VERSION = '0.70'; | |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
4956 | 4956 | |
4957 | 4957 | =head1 COPYRIGHT AND LICENSE |
4958 | 4958 | |
4959 | Copyright (C) 2008-2015 by Salvador FandiE<ntilde>o | |
4959 | Copyright (C) 2008-2016 by Salvador FandiE<ntilde>o | |
4960 | 4960 | (sfandino@yahoo.com) |
4961 | 4961 | |
4962 | 4962 | This library is free software; you can redistribute it and/or modify |