Lite.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 91.3% 21 / 23 CC 2 SCAR 3.5
CC
2
Cov
89%
BEGIN
2.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
↑ Summary Lite/Generic.pm »
1 package Term::Screen::Lite;
2  
3 1 $Term::Screen::Lite::VERSION = '0.04';
4  
5 =head1 NAME
6  
7 Term::Screen::Lite - Platform independent interface to terminal screen.
8  
9 =head1 VERSION
10  
11 Version 0.04
12  
13 =cut
14  
15 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 BEGIN {
22 1 ▶ if ($^O eq 'MSWin32') {
Subroutine BEGIN: called CC=2 SCAR=8.1
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq 'MSWin32') { } 0 1 1
23 0 extends 'Term::Screen::Lite::Win32';
24 }
25 else {
26 1 extends 'Term::Screen::Lite::Generic';
27 }
28 }
29  
30 =head1 DESCRIPTION
31  
32 It currently provides only one function to clear screen irrespective of platofrm.
33 I was looking for such feature and couldn't find one that works without any issue
34 for me. I am planning to use this in my L<Games::Cards::Pair> distribution.
35  
36 This is just a wrapper class for two other packages L<Term::Screen::Lite::Win32>
37 and L<Term::Screen::Lite::Generic>. Depending on the platform, relevant package
38 gets imported by the wrapper.
39  
40 =head1 SYNOPSIS
41  
42 use strict; use warnings;
43 use Term::Screen::Lite;
44  
45 print Term::Screen::Lite->new->clear;
46  
47 =head1 METHODS
48  
49 =head2 clear()
50  
51 Clears the screen and takes the pointer to the top left corner of the screen.
52  
53 =head1 AUTHOR
54  
55 Mohammad S Anwar, C<< <mohammad.anwar at yahoo.com> >>
56  
57 =head1 REPOSITORY
58  
59 L<https://github.com/manwar/Term-Screen-Lite>
60  
61 =head1 SEE ALSO
62  
63 L<Term::Screen::Uni>
64  
65 =head1 BUGS
66  
67 Please report any bugs or feature requests to C<bug-term-screen-lite at rt.cpan.org>,
68 or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Term-Screen-Lite>.
69 I will be notified and then you'll automatically be notified of progress on your
70 bug as I make changes.
71  
72 =head1 SUPPORT
73  
74 You can find documentation for this module with the perldoc command.
75  
76 perldoc Term::Screen::Lite
77  
78 You can also look for information at:
79  
80 =over 4
81  
82 =item * RT: CPAN's request tracker (report bugs here)
83  
84 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Term-Screen-Lite>
85  
86 =item * AnnoCPAN: Annotated CPAN documentation
87  
88 L<http://annocpan.org/dist/Term-Screen-Lite>
89  
90 =item * CPAN Ratings
91  
92 L<http://cpanratings.perl.org/d/Term-Screen-Lite>
93  
94 =item * Search CPAN
95  
96 L<http://search.cpan.org/dist/Term-Screen-Lite/>
97  
98 =back
99  
100 =head1 LICENSE AND COPYRIGHT
101  
102 Copyright (C) 2015 - 2017 Mohammad S Anwar.
103  
104 This program is free software; you can redistribute it and / or modify it under
105 the terms of the the Artistic License (2.0). You may obtain a copy of the full
106 license at:
107  
108 L<http://www.perlfoundation.org/artistic_license_2_0>
109  
110 Any use, modification, and distribution of the Standard or Modified Versions is
111 governed by this Artistic License.By using, modifying or distributing the Package,
112 you accept this license. Do not use, modify, or distribute the Package, if you do
113 not accept this license.
114  
115 If your Modified Version has been derived from a Modified Version made by someone
116 other than you,you are nevertheless required to ensure that your Modified Version
117 complies with the requirements of this license.
118  
119 This license does not grant you the right to use any trademark, service mark,
120 tradename, or logo of the Copyright Holder.
121  
122 This license includes the non-exclusive, worldwide, free-of-charge patent license
123 to make, have made, use, offer to sell, sell, import and otherwise transfer the
124 Package with respect to any patent claims licensable by the Copyright Holder that
125 are necessarily infringed by the Package. If you institute patent litigation
126 (including a cross-claim or counterclaim) against any party alleging that the
127 Package constitutes direct or contributory patent infringement,then this Artistic
128 License to you shall terminate on the date that such litigation is filed.
129  
130 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND
131 CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
132 WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
133 NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS
134 REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT,
135 INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE
136 OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
137  
138 =cut
139  
140 1 1; # End of Term::Screen::Lite
↑ Summary Lite/Generic.pm »