AnyEvent-FTP

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

{
   "abstract" : "Simple asynchronous FTP client and server",
   "author" : [
      "Graham Ollis <plicease@cpan.org>"
   ],
   "dynamic_config" : 0,
   "generated_by" : "Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010",
   "license" : [
      "perl_5"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",

META.yml  view on Meta::CPAN

---
abstract: 'Simple asynchronous FTP client and server'
author:
  - 'Graham Ollis <plicease@cpan.org>'
build_requires:
  EV: '0'
  Test2::V0: '0.000121'
  perl: '5.010'
configure_requires:
  ExtUtils::MakeMaker: '0'
  File::ShareDir::Install: '0.06'
  perl: '5.010'

Makefile.PL  view on Meta::CPAN

use warnings;
use 5.010;
use ExtUtils::MakeMaker;
use File::ShareDir::Install;

$File::ShareDir::Install::INCLUDE_DOTFILES = 1;
$File::ShareDir::Install::INCLUDE_DOTDIRS  = 1;
install_share dist => "share";

my %WriteMakefileArgs = (
  "ABSTRACT"           => "Simple asynchronous FTP client and server",
  "AUTHOR"             => "Graham Ollis <plicease\@cpan.org>",
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker"     => 0,
    "File::ShareDir::Install" => "0.06"
  },
  "DISTNAME"  => "AnyEvent-FTP",
  "EXE_FILES" => [
    "bin/aeftpd"
  ],
  "LICENSE"          => "perl",

README  view on Meta::CPAN

NAME

    AnyEvent::FTP - Simple asynchronous FTP client and server

VERSION

    version 0.19

SYNOPSIS

     # For the client
     use AnyEvent::FTP::Client;
     

lib/AnyEvent/FTP.pm  view on Meta::CPAN

package AnyEvent::FTP;

use strict;
use warnings;
use 5.010;

# ABSTRACT: Simple asynchronous FTP client and server
our $VERSION = '0.19'; # VERSION


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP - Simple asynchronous FTP client and server

=head1 VERSION

version 0.19

=head1 SYNOPSIS

 # For the client
 use AnyEvent::FTP::Client;
 

lib/AnyEvent/FTP/Client.pm  view on Meta::CPAN

package AnyEvent::FTP::Client;

use 5.010;
use Moo;
use AnyEvent;
use AnyEvent::Socket qw( tcp_connect );
use AnyEvent::Handle;
use Carp qw( croak );
use Socket qw( unpack_sockaddr_in inet_ntoa );

# ABSTRACT: Simple asynchronous ftp client
our $VERSION = '0.19'; # VERSION


with 'AnyEvent::FTP::Role::Event';
with 'AnyEvent::FTP::Client::Role::ResponseBuffer';
with 'AnyEvent::FTP::Client::Role::RequestBuffer';


__PACKAGE__->define_events(qw( error close send greeting ));

lib/AnyEvent/FTP/Client.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client - Simple asynchronous ftp client

=head1 VERSION

version 0.19

=head1 SYNOPSIS

Non blocking example:

 use strict;

lib/AnyEvent/FTP/Client/Response.pm  view on Meta::CPAN

package AnyEvent::FTP::Client::Response;

use strict;
use warnings;
use 5.010;
use base qw( AnyEvent::FTP::Response );

# ABSTRACT: Response class for asynchronous ftp client
our $VERSION = '0.19'; # VERSION


sub get_address_and_port
{
  return ("$1.$2.$3.$4", $5*256+$6) if shift->{message}->[0] =~ /\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/;
  return;
}


lib/AnyEvent/FTP/Client/Response.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client::Response - Response class for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 DESCRIPTION

Instances of this class get sent to condition variables returned by
commands in L<AnyEvent::FTP::Client>.

lib/AnyEvent/FTP/Client/Role/RequestBuffer.pm  view on Meta::CPAN

package AnyEvent::FTP::Client::Role::RequestBuffer;

use strict;
use warnings;
use 5.010;
use Moo::Role;
use AnyEvent;

# ABSTRACT: Request buffer role for asynchronous ftp client
our $VERSION = '0.19'; # VERSION


has request_buffer => (
  is      => 'ro',
  default => sub { [] },
);

sub push_command
{

lib/AnyEvent/FTP/Client/Role/RequestBuffer.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client::Role::RequestBuffer - Request buffer role for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 DESCRIPTION

Used internally by L<AnyEvent::FTP::Client>.

=head1 AUTHOR

lib/AnyEvent/FTP/Client/Role/ResponseBuffer.pm  view on Meta::CPAN

package AnyEvent::FTP::Client::Role::ResponseBuffer;

use strict;
use warnings;
use 5.010;
use Moo::Role;
use AnyEvent::FTP::Client::Response;

# ABSTRACT: Response buffer role for asynchronous ftp client
our $VERSION = '0.19'; # VERSION


sub on_next_response
{
  my($self, $cb) = @_;
  push @{ $self->{response_buffer}->{once} }, $cb;
}

sub on_each_response

lib/AnyEvent/FTP/Client/Role/ResponseBuffer.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client::Role::ResponseBuffer - Response buffer role for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 DESCRIPTION

Used internally by L<AnyEvent::FTP::Client>.

=head1 AUTHOR

lib/AnyEvent/FTP/Client/Transfer.pm  view on Meta::CPAN

package AnyEvent::FTP::Client::Transfer;

use strict;
use warnings;
use 5.010;
use Moo;
use AnyEvent;
use AnyEvent::Handle;
use Carp qw( confess );

# ABSTRACT: Transfer class for asynchronous ftp client
our $VERSION = '0.19'; # VERSION


# TODO: implement ABOR


with 'AnyEvent::FTP::Role::Event';


__PACKAGE__->define_events(qw( open close eof ));

lib/AnyEvent/FTP/Client/Transfer.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client::Transfer - Transfer class for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 SYNOPSIS

 use AnyEvent::FTP::Client;
 my $client = AnyEvent::FTP::Client;
 $client->connect('ftp://ftp.cpan.org')->cb(sub {

lib/AnyEvent/FTP/Client/Transfer/Active.pm  view on Meta::CPAN


use strict;
use warnings;
use Moo;
use 5.010;
use AnyEvent;
use AnyEvent::Socket qw( tcp_server );

extends 'AnyEvent::FTP::Client::Transfer';

# ABSTRACT: Active transfer class for asynchronous ftp client
our $VERSION = '0.19'; # VERSION

sub BUILD
{
  my($self) = @_;

  my $local = $self->convert_local($self->local);

  my $count = 0;
  my $guard;

lib/AnyEvent/FTP/Client/Transfer/Active.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client::Transfer::Active - Active transfer class for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 AUTHOR

Author: Graham Ollis E<lt>plicease@cpan.orgE<gt>

Contributors:

lib/AnyEvent/FTP/Client/Transfer/Passive.pm  view on Meta::CPAN

package AnyEvent::FTP::Client::Transfer::Passive;

use strict;
use warnings;
use Moo;
use 5.010;
use AnyEvent::Socket qw( tcp_connect );

extends 'AnyEvent::FTP::Client::Transfer';

# ABSTRACT: Passive transfer class for asynchronous ftp client
our $VERSION = '0.19'; # VERSION

sub BUILD
{
  my($self) = @_;

  my $local = $self->convert_local($self->local);

  my $data_connection = sub {
    my $res = shift;

lib/AnyEvent/FTP/Client/Transfer/Passive.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Client::Transfer::Passive - Passive transfer class for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 AUTHOR

Author: Graham Ollis E<lt>plicease@cpan.orgE<gt>

Contributors:

lib/AnyEvent/FTP/Request.pm  view on Meta::CPAN

package AnyEvent::FTP::Request;

use strict;
use warnings;
use 5.010;
use overload '""' => sub { shift->as_string }, bool => sub { 1 }, fallback => 1;

# ABSTRACT: Request class for asynchronous ftp server
our $VERSION = '0.19'; # VERSION


sub new
{
  my($class, $cmd, $args, $raw) = @_;
  bless { command => $cmd, args => $args, raw => $raw }, $class;
}


lib/AnyEvent/FTP/Request.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Request - Request class for asynchronous ftp server

=head1 VERSION

version 0.19

=head1 DESCRIPTION

Instances of this class represent client requests.

=head1 ATTRIBUTES

lib/AnyEvent/FTP/Response.pm  view on Meta::CPAN

package AnyEvent::FTP::Response;

use strict;
use warnings;
use 5.010;
use overload
  '""' => sub { shift->as_string },
  fallback => 1,
  bool => sub { 1 }, fallback => 1;

# ABSTRACT: Response class for asynchronous ftp client
our $VERSION = '0.19'; # VERSION


sub new
{
  my($class, $code, $message) = @_;
  $message = [ $message ] unless ref($message) eq 'ARRAY';
  bless { code => $code, message => $message }, $class;
}

lib/AnyEvent/FTP/Response.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Response - Response class for asynchronous ftp client

=head1 VERSION

version 0.19

=head1 DESCRIPTION

Instances of this class represent a FTP server response.

=head1 ATTRIBUTES

lib/AnyEvent/FTP/Server.pm  view on Meta::CPAN


use strict;
use warnings;
use 5.010;
use Moo;
use AnyEvent::Handle;
use AnyEvent::Socket qw( tcp_server );
use AnyEvent::FTP::Server::Connection;
use Socket qw( unpack_sockaddr_in inet_ntoa );

# ABSTRACT: Simple asynchronous ftp server
our $VERSION = '0.19'; # VERSION


$AnyEvent::FTP::Server::VERSION //= 'dev';

with 'AnyEvent::FTP::Role::Event';

__PACKAGE__->define_events(qw( bind connect ));


lib/AnyEvent/FTP/Server.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AnyEvent::FTP::Server - Simple asynchronous ftp server

=head1 VERSION

version 0.19

=head1 SYNOPSIS

 use AnyEvent;
 use AnyEvent::FTP::Server;
 



( run in 0.360 second using v1.01-cache-2.11-cpan-0d8aa00de5b )