#! /usr/bin/perl use strict; use warnings; use Prima::sys::Gencls; # Main unless ( $ARGV[ 0]) { print <{ depend} = 1; next ARGUMENT; }; /^--sayparent$/ && do { $args->{ sayparent} = 1; next ARGUMENT; }; /^--h$/ && do { $args->{ genH} = 1; next ARGUMENT; }; /^--inc$/ && do { $args->{ genInc} = 1; next ARGUMENT; }; /^--tml$/ && do { $args->{ genTml} = 1; next ARGUMENT; }; /^-O$/ && do { $args->{ optimize} = 1; next ARGUMENT; }; /^-I(.*)$/ && do { my $ii = $1; push @{ $args->{ incpath}}, split ';', $ii; next ARGUMENT; }; last ARGUMENT; } continue { shift @ARGV; } die "insufficient number of parameters" unless $ARGV [0]; $ARGV[ 0] =~ m{^(.*[\\/])[^\\/]*$}; $args->{ dirPrefix} = $1 || ""; $args->{ dirOut} = "$ARGV[ 1]/" if $ARGV[ 1]; my @ancestors = gencls( $ARGV[ 0], $args); if ( @ancestors) { print ( map { "ancestor: $_\n"} @ancestors); }