use latest;
use lib 'lib';

use Net::FTP::Rule;
use DDP;

my $ftp
  = Net::FTP::Rule->new( 'cdaftp.cfa.harvard.edu', 'anonymous',
    'dr.calibration.dev@cxc' )
  or die( "unable to connect to server\n" );


# $ftp->skip_dirs( qr/aspect/ );
# $ftp->file->name( qr/pbk/ );

#$ftp->all( "/pub/er/1999/cat0/62757/secondary", { visitor => sub { say $_->{path} } } );
$ftp->all(
    "/",
    {
     visitor => sub { #p $_;
                      say $_->{path}, ' ', $_->{type};
                      return;
                  }
    } );
