Autodia
view release on metacpan or search on metacpan
my @wildcards = @{$file_extensions{wildcards}};
print "searching files using wildcards : @wildcards \n" unless ( $config{silent} );
foreach my $directory (@dirs) {
if ($directory =~ m/^(CVS|RCS)/ and $config{skipcvs}) {
warn "skipping $directory\n" unless ( $config{silent} );
next;
}
print "searching $directory\n" unless ( $config{silent} );
$directory =~ s|(.*)\/$|$1|;
foreach my $wildcard (@wildcards) {
print "$wildcard" unless ( $config{silent} );
print " .. " , <$directory/*.$wildcard>, " \n";
push @filenames, <$directory/*.$wildcard>;
}
}
}
}
}
$config{inputpath} = $inputpath;
unless (defined $args{'d'} || $args{'i'} || $args{'p'}) {
if (@ARGV) {
@filenames = @ARGV;
} else {
print_instructions();
exit;
}
}
$config{filenames} = \@filenames;
$config{use_stdout} = (defined $args{'O'}) ? 1 : 0;
$config{templatefile} = (defined $args{'t'}) ? $args{'t'} : undef;
$config{outputfile} = (defined $args{'o'}) ? $args{'o'} : "autodia.out.dia";
$config{no_deps} = (defined $args{'D'}) ? 1 : 0;
$config{sort} = (defined $args{'s'}) ? 1 : 0;
return \%config;
}
sub print_instructions {
print "AutoDia - Automatic Dia XML. Copyright 2001 A Trevena\n\n";
print <<end;
usage:
autodia.pl ([-i filename [-p path] ] or [-d directory [-r] ]) [options]
autodia.pl -i filename : use filename as input
autodia.pl -i "filea fileb filec" : use filea, fileb and filec as input
autodia.pl -i filename -p .. : use ../filename as input file
autodia.pl -d directoryname : use *.pl/pm in directoryname as input files
autodia.pl -d 'foo bar quz' : use *pl/pm in directories foo, bar and quz as input files
autodia.pl -d directory -r : use *pl/pm in directory and its subdirectories as input files
autodia.pl -d directory -F : use files in directory but only one file per diagram
autodia.pl -d directory -C : use files in directory but skip CVS directories
autodia.pl -o outfile.xml : use outfile.xml as output file (otherwise uses autodial.out.dia)
autodia.pl -O : output to stdout
autodia.pl -l language : parse source as language (ie: C) and look for appropriate filename extensions if also -d
autodia.pl -t templatefile : use templatefile as template (otherwise uses default)
autodia.pl -l DBI -i "mysql:test:localhost" -U username -P password : use the test database on localhost with username and password as username and password
autodia.pl -l Mason -i "/index.html" -p comp_root -G '\$c' : use HTML::Mason to fetch /index.html from comp_root and show all components in reach. -G corresponds to allow_globals.
autodia.pl -z : use graphviz to produce dot, gif, jpg or png output
autodia.pl -Z : use springgraph to produce png output
autodia.pl -v : use vcg to output postscript
autodia.pl -D : ignore dependancies (ie do not process or display dependancies)
autodia.pl -K : process dependance but do not display in output
autodia.pl -k : process inheritance but do not display in output
autodia.pl -S : silent mode, no output to stdout except with -O
autodia.pl -s skipfile : exclude files or packagenames matching those listed in file
autodia.pl -H : show only public/visible methods and attributes
autodia.pl -m : show only Class methods
autodia.pl -M : do not show Class Methods
autodia.pl -a : show only Class Attributes
autodia.pl -A : do not show Class Attributes
autodia.pl -h : display this help message
autodia.pl -V : display copyright message and version number
end
print "\n\n";
return;
}
##############################################################################
=head1 NAME
autodia.pl - a perl script using the Autodia modules to create UML Class Diagrams or documents. from code or other data sources.
=head1 INTRODUCTION
AutoDia takes source files as input and using a handler parses them to create documentation through templates. The handlers allow AutoDia to parse any language by providing a handler and registering in in autodia.pm. The templates allow the output to...
AutoDia is written in perl and defaults to the perl handler and file extension matching unless a language is specified using the -l switch.
AutoDia requires Template Toolkit and Perl 5. Some handlers and templates may require additional software, for example the Java SDK for the java handler.
AutoDia can use GraphViz to generate layout coordinates, and can produce di-graphs (notation for directional graphs) in dot (plain or canonical) and vcg, as well as Dia xml.
Helpful information, links and news can be found at the autodia website - http://www.aarontrevena.co.uk/opensource/autodia/
=head1 USAGE
=over 4
=item C<autodia.pl ([-i filename [-p path] ] or [-d directory [-r] ]) [options]>
=item C<autodia.pl -i filename : use filename as input>
=item C<autodia.pl -i 'filea fileb filec' : use filea, fileb and filec as input>
=item C<autodia.pl -i filename -p .. : use ../filename as input file>
=item C<autodia.pl -d directoryname : use *.pl/pm in directoryname as input files>
=item C<autodia.pl -d 'foo bar quz' : use *pl/pm in directories foo, bar and quz as input files>
=item C<autodia.pl -d directory -r : use *pl/pm in directory and its subdirectories as input files>
=item C<autodia.pl -d directory -F : use files in directory but only one file per diagram>
=item C<autodia.pl -d directory -C : use files in directory but skip CVS directories>
=item C<autodia.pl -o outfile.xml : use outfile.xml as output file (otherwise uses autodial.out.dia)>
=item C<autodia.pl -O : output to stdout>
( run in 2.009 seconds using v1.01-cache-2.11-cpan-302cb4679cc )