Module namespace: Tie::Flatfile::Array

I'm creating a module called Tie::Flatfile::Array. The module will allow
the user to treat a "database" flat-file as an array of arrays. This is
how my new module might be used:

#!/usr/bin/perl
use strict;
use warnings;
use Tie::Flatfile::Array;
use Fcntl;

my $packformat = 'A30N';

tie my [at] db, 'Tie::Flatfile::Array', 'my.flat',
O_RDWR | O_CREAT, 0644, $packformat
or die("tie failed: $!");

push [at] db, ['yahoo.com', 3461];
push [at] db, ['lycos.com', 1449];
push [at] db, ['search.go.com', 960];

local $" = "\t";
print " [at] {[ qw(SearchDomain Hits) ]}\n";

for my $ix (0..$#db) {
print " [at] {$db[$ix]}\n";
}


untie [at] db;

__END__

The $packformat specifies that each record will contain thirty ascii
characters followed by an integer in network byte-order (A30N). I think
the appropriate namespace for this module is Tie::Flatfile::Array¹. What
do you people think about the namespace and the module?

----------------------
¹ A Tie::Flatfile::Hash may or may not be coming too.

--
Windows Vista and your freedom in conflict:
http://techdirt.com/articles/20061019/102225.shtml
paduille.4060.mumia.w[1] [ Mo, 26 Februar 2007 05:55 ] [ ID #1640898 ]
Perl » comp.lang.perl.modules » Module namespace: Tie::Flatfile::Array

Vorheriges Thema: LWP::UserAgent hangs up infinitively
Nächstes Thema: Config::Any fails tests on install