File Coverage

blib/lib/Alien/PlantUML.pm
Criterion Covered Total %
statement 14 18 77.7
branch 0 2 0.0
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 20 27 74.0


line stmt bran cond sub pod time code
1             package Alien::PlantUML;
2             $Alien::PlantUML::VERSION = '0.01';
3 1     1   264683 use strict;
  1         3  
  1         59  
4 1     1   6 use warnings;
  1         4  
  1         78  
5 1     1   8 use base qw( Alien::Base );
  1         2  
  1         1996  
6 1     1   7633 use 5.008004;
  1         4  
7              
8 1     1   7 use File::Spec;
  1         1  
  1         173  
9              
10             sub jar_file {
11 0     0 1   my ($class) = @_;
12 0 0         if( $class->install_type eq 'share' ) {
13 0           return File::Spec->catfile( $class->dist_dir, $class->runtime_prop->{jar_file});
14             }
15 0           return $class->runtime_prop->{jar_file};
16             }
17              
18             1;
19              
20             =head1 NAME
21              
22             Alien::PlantUML - Find or build PlantUML diagram generator
23              
24             =head1 SYNOPSIS
25              
26             Command line tool:
27              
28             use Alien::PlantUML;
29             use Env qw( @PATH );
30              
31             unshift @PATH, Alien::PlantUML->bin_dir;
32              
33             =head1 DESCRIPTION
34              
35             This distribution provides PlantUML so that it can be used by other
36             Perl distributions that are on CPAN. It does this by first trying to
37             detect an existing install of PlantUML on your system. If found it
38             will use that. If it cannot be found, the source code will be downloaded
39             from the internet and it will be installed in a private share location
40             for the use of other modules.
41              
42             =head1 CLASS METHODS
43              
44             =head2 jar_file
45              
46             Returns the path to the JAR file for PlantUML:
47              
48             system(qw(java), '-jar', Alien::PlantUML->jar_file, '-version');
49              
50             =head1 SEE ALSO
51              
52             =over 4
53              
54             =item L
55              
56             PlantUML homepage
57              
58             =item L
59              
60             Documentation on the Alien concept itself.
61              
62             =item L
63              
64             The base class for this Alien.
65              
66             =item L
67              
68             Detailed manual for users of Alien classes.
69              
70             =back
71              
72             =cut