support 5.8 only.
[chise/perl.git] / sample2.pl
1 # sample2.pl (compareのsample)
2 # $Id: sample2.pl,v 1.3 2003-10-08 13:30:29 moro Exp $
3 use CHISE;
4
5 my $s1 = CHISE->define_char(strokes => 12, radical => 9);
6 my $s2 = CHISE->define_char(strokes => 12, radical => 9, daikanwa => 694);
7 my $c = $s1->compare($s2);
8
9 if ($c == $CHISE::EXCLUSIVE) {
10   print "他的\n";
11 } elsif ($c == $CHISE::HAVE_INTERSECTION) {
12   print "共通あり\n";
13 } elsif ($c == $CHISE::PROPER_SUBSET) {
14   print "全合\n";
15 } elsif ($c == $CHISE::PROPER_SUPERSET) {
16   print "全上合\n";
17 } elsif ($c == $CHISE::EQSET) {
18   print "全一致\n";
19 }