Súbor: [Platon] / iotta / Iotta / Format / Auto.pm (stiahnutie)
Revízia 1.1.1.1, Sun Feb 16 15:48:11 2003 UTC (21 years, 1 month ago) by yenar
Zmeny od 1.1: +0 -0
[lines]
initial import of iotta into platon cvs
|
package Iotta::Format::Auto;
use base Iotta::Elem;
sub run {
my $s = shift;
my $m = shift;
my $in = shift;
my $fi;
my $fo;
my $infmt = $$m{format};
$infmt =~ s/^(.)/$a = $1; $a =~ tr@a-z@A-Z@; $a/e;
$infmt =~ s/[-_](.)/$a = $1; $a =~ tr@a-z@A-Z@; $a/ge;
$infmt =~ s/-/_/g;
$fi=("Iotta::Format::In::".$infmt)->new; #FIXME
$fo=("Iotta::Format::Out::".$s->outfmt)->new;
$fi->next ($fo);
$fo->next ($s -> next);
#$s->next->run ($m, $out) if ($s->next);
$fi->run ($m, $in);
}
sub setup {
my $self = shift;
my $o = shift;
$self->{outfmt} = $$o{format};
}
sub initialize {
my $self = shift;
$self->SUPER::initialize (@_);
}
1;
Platon Group <platon@platon.sk> http://platon.sk/
|