[Bio] / FigKernelPackages / gd_tree_0.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/gd_tree_0.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Mon Jun 22 18:46:20 2009 UTC revision 1.2, Thu Jun 25 01:19:29 2009 UTC
# Line 36  Line 36 
36  {  {
37      my ( $tree, $options ) = @_;      my ( $tree, $options ) = @_;
38    
39        $options ||= {};
40        my $file = $options->{ file };
41        my $fh;
42        if    ( ! $file )                { $fh = \*STDOUT }
43        elsif ( ref( $file ) eq 'GLOB' ) { $fh = $file }
44        else
45        {
46            open( $fh, ">$file" )
47                or print STERR "Could not open $file.\n" and return 0;
48        }
49    
50      my $image = gd_plot_newick( $tree, $options );      my $image = gd_plot_newick( $tree, $options );
51    
52      binmode STDOUT;      print $fh $image->png;
53      print $image->png;  
54        close( $fh ) if $file && ! ref( $file );
55        return 1;
56  }  }
57    
58    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3