AnyData2

 view release on metacpan or  search on metacpan

lib/AnyData2/Format/FileSystem.pm  view on Meta::CPAN


constructs a filesystem format

=cut

sub new
{
    my ( $class, $storage, %options ) = @_;
    my $self = $class->SUPER::new($storage);

    $self->{fs_cols} = [qw(entry dev ino mode nlink uid gid rdev size atime mtime ctime blksize blocks)];

    $self;
}

=head2 cols

Return column names

=cut

t/02-filesystem.t  view on Meta::CPAN

my $cols = $af->cols;
my @rows;

while ( my $row = $af->fetchrow )
{
    push @rows, $row;
}

my @stripped_rows = sort { $a->[0] cmp $b->[0] } map { [ $_->[0] ] } @rows;

is_deeply( $cols, [qw(entry dev ino mode nlink uid gid rdev size atime mtime ctime blksize blocks)], "Cols from filesystem" );
is_deeply( \@stripped_rows, [ ["."], [".."], ["simple.blocks"], ["simple.csv"] ], "Rows from filesystem" );

done_testing;



( run in 0.594 second using v1.01-cache-2.11-cpan-5735350b133 )