Codebase list libnet-openssh-perl / 0b3675c
Imported Upstream version 0.70 gregor herrmann 8 years ago
8 changed file(s) with 82 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Perl extension Net::OpenSSH.
11
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
28 0.68 Dec 20, 2015
3 - Rerelease as stable
9 - Rerelease as stable.
410
511 0.67_02 Dec 4, 2015
612 - Do not croak when a method gets an unknown argument as far
7 as its value is undef
13 as its value is undef.
814
915 0.67_01 Nov 7, 2015
1016 - fix internal waitpid usage (bug report by Konrad
1111 lib/Net/OpenSSH/ShellQuoter.pm
1212 lib/Net/OpenSSH/ShellQuoter/POSIX.pm
1313 lib/Net/OpenSSH/ShellQuoter/csh.pm
14 lib/Net/OpenSSH/ShellQuoter/fish.pm
1415 lib/Net/OpenSSH/ShellQuoter/MSWin.pm
1516 lib/Net/OpenSSH/ShellQuoter/MSCmd.pm
1617 lib/Net/OpenSSH/ShellQuoter/Chain.pm
33 "Salvador Fandino <sfandino@yahoo.com>"
44 ],
55 "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",
77 "license" : [
8 "unknown"
8 "perl_5"
99 ],
1010 "meta-spec" : {
1111 "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
4141 "url" : "https://github.com/salva/p5-Net-OpenSSH"
4242 }
4343 },
44 "version" : "0.68"
44 "version" : "0.70",
45 "x_serialization_backend" : "JSON::PP version 2.27300"
4546 }
66 configure_requires:
77 ExtUtils::MakeMaker: '0'
88 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
1111 meta-spec:
1212 url: http://module-build.sourceforge.net/META-spec-v1.4.html
1313 version: '1.4'
2020 Test::More: '0'
2121 resources:
2222 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'
3737 WriteMakefile( NAME => 'Net::OpenSSH',
3838 VERSION_FROM => 'lib/Net/OpenSSH.pm',
3939 ABSTRACT_FROM => 'lib/Net/OpenSSH.pm',
40 LICENSE => 'perl_5',
4041 PREREQ_PM => { Test::More => 0, },
4142 AUTHOR => 'Salvador Fandino <sfandino@yahoo.com>',
4243 META_MERGE => {
2525
2626 COPYRIGHT AND LICENCE
2727
28 Copyright (C) 2008-2015 by Salvador Fandino
28 Copyright (C) 2008-2016 by Salvador Fandino
2929
3030 This library is free software; you can redistribute it and/or modify
3131 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;
00 package Net::OpenSSH;
11
2 our $VERSION = '0.68';
2 our $VERSION = '0.70';
33
44 use strict;
55 use warnings;
49564956
49574957 =head1 COPYRIGHT AND LICENSE
49584958
4959 Copyright (C) 2008-2015 by Salvador FandiE<ntilde>o
4959 Copyright (C) 2008-2016 by Salvador FandiE<ntilde>o
49604960 (sfandino@yahoo.com)
49614961
49624962 This library is free software; you can redistribute it and/or modify