File: ascii.pl

package info (click to toggle)
libgraph-easy-perl 0.71-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,284 kB
  • sloc: perl: 24,909; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl -w

#############################################################################
# This example is a bit outdated, please use the new bin/grapheasy script -
# which is after "make install" available in your system as simple as
# "grapheasy" on any command line prompt.

#############################################################################
# This script uses examples/common.pl to generate some example graphs and
# displays them in ASCII.

use strict;
use warnings;

BEGIN { chdir 'examples' if -d 'examples'; }

require "common.pl";

sub out
  {
  my ($graph,$method) = @_;

  $method = 'as_' . $method;
  print $graph->$method(), "\n";
  }

gen_graphs ();