summaryrefslogtreecommitdiff
path: root/regress/cf/test.overload.pl
blob: 36bec98100935e20846531fb7f9d2a9e14f36173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/local/bin/perl
#
# $FML: mime.pl,v 1.6 2001/06/17 09:00:30 fukachan Exp $
#

use strict;
use Carp;
use lib qw(../../fml/lib ../../cpan/lib);
use FML::Config;

my $config = new FML::Config;
my @prev_x = ();
my $i = 0;

for my $f (@ARGV) {
    $config->overload($f);

    my $x = $config->{ 'x' };
    print STDERR "   x = $x (loaded $f)\n";

    # save values
    $prev_x[ $i ] = $x; $i++;
}

$prev_x[ 0 ] =~ s/xxx/yyy/;

if ($prev_x[ 0 ] eq $prev_x[ 1]) {
    print STDERR "ok\n";
}
else {
    print STDERR "fail\n";
}

1;