Lite.pm

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