#!/usr/bin/env perl

# Pragmas.
use strict;
use warnings;

# Modules.
use PYX::GraphViz;

# Arguments.
if (@ARGV < 1) {
	print STDERR "Usage: $0 [filename] [-]\n";
	print STDERR "\tfilename\tprocess on filename\n";
	print STDERR "\t-\t\tprocess on stdin\n";
	exit 1;
}
my $process_file = $ARGV[0];

# PYX::GraphViz object.
my $g = PYX::GraphViz->new;

# Parse from stdin.
if ($process_file eq '-') {
	$g->parse_handler(\*STDIN);

# Parse file.
} else {
	$g->parse_file($process_file);
}
