File Coverage

blib/lib/Goo/Thing/pm/Editor.pm
Criterion Covered Total %
statement 18 22 81.8
branch 0 2 0.0
condition n/a
subroutine 6 7 85.7
pod 1 1 100.0
total 25 32 78.1


line stmt bran cond sub pod time code
1             package Goo::Thing::pm::Editor;
2              
3             ###############################################################################
4             # Nigel Hamilton
5             #
6             # Copyright Nigel Hamilton 2005
7             # All Rights Reserved
8             #
9             # Author: Nigel Hamilton
10             # Filename: Goo::Thing::pm::Editor.pm
11             # Description: Edit a program interactively as fast as possible
12             #
13             # Date Change
14             # -----------------------------------------------------------------------------
15             # 15/02/2005 Auto generated file
16             # 15/02/2005 Wanted to boost my code-cutting productivity and accuracy
17             # Other things to add - renaming methods automatically changes
18             # tests and 'link backs' from other modules
19             # 16/02/2005 Added deleteMethod method - this is a bit of a mind bend!
20             # 05/05/2005 Added a TypeLessTranslator to make typing quicker - think
21             # phone txt 4 code! The idea is write shrt read looonger.
22             # 01/07/2005 Integrated new model of "Things"
23             # 01/08/2005 New command-based system caused massive refactoring of this
24             # module. It used a whopping 16 other modules - crazy!
25             # 07/08/2005 Want to add ThereDocs back into the mix
26             # 17/08/2005 Added method: doTypeLessTranslation
27             # 17/08/2005 Added method: doThereDoc
28             # 02/11/2005 Now returns to the location of the original ThereDoc
29             # Handles all actions a Thing can do: e > > p > > l > >
30             # 03/11/2005 Preparing for CPAN alpha release
31             #
32             ###############################################################################
33              
34 1     1   11279 use strict;
  1         2  
  1         37  
35              
36 1     1   6 use Goo::Object;
  1         3  
  1         19  
37 1     1   6 use Goo::Editor;
  1         1  
  1         24  
38 1     1   6 use Goo::Thing::pm::TypeChecker;
  1         2  
  1         19  
39 1     1   6 use Goo::Thing::pm::Perl5Editor;
  1         2  
  1         24  
40             #use Goo::Thing::pm::Perl6Editor;
41              
42 1     1   8 use base qw(Goo::Object);
  1         1  
  1         168  
43              
44              
45             ###############################################################################
46             #
47             # run - edit a program
48             #
49             ###############################################################################
50              
51             sub run {
52              
53 0     0 1   my ($this, $thing, $line_number) = @_;
54              
55 0 0         if (Goo::Thing::pm::TypeChecker::is_perl6($thing)) {
56             # really simple editor
57 0           Goo::Editor->new()->run($thing, $line_number);
58             } else {
59 0           Goo::Thing::pm::Perl5Editor->new()->run($thing, $line_number);
60             }
61              
62             }
63              
64             1;
65              
66              
67             __END__
68              
69             =head1 NAME
70              
71             Goo::Thing::pm::Editor - Edit a program interactively as fast as possible
72              
73             =head1 SYNOPSIS
74              
75             use Goo::Thing::pm::Editor;
76              
77             =head1 DESCRIPTION
78              
79              
80              
81             =head1 METHODS
82              
83             =over
84              
85             =item run
86              
87             Delegate editing a Perl program to either a Goo::Editor or a Goo::Thing::pm::Perl5Editor.
88              
89             =back
90              
91             =head1 AUTHOR
92              
93             Nigel Hamilton <nigel@trexy.com>
94              
95             =head1 SEE ALSO
96