blib/lib/ACME/MSDN/SPUtility.pm

filter: Statementstmt 39.2% 11 / 28 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 42.8% 3 / 7 Podpod 100% 4 / 4 totaltotal 40.9% 18 / 44 CC 2 SCAR 9.7
CC
2
Cov
35%
new
6.0
HideTaiwan
2.0
HideChina
2.0
CRAP 2.6
↑ Summary
1 package ACME::MSDN::SPUtility;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Perl6::Say;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =encoding utf8
9  
10 =head1 NAME
11  
12 ACME::MSDN::SPUtility - SPUtility.HideTaiwan Method (Microsoft.SharePoint.Utilities)
13  
14 =head1 VERSION
15  
16 Version 0.04
17  
18 =cut
19  
20 2 our $VERSION = '0.04';
21  
22  
23 =head1 SYNOPSIS
24  
25 This is a Implementation of part of MSDN SPUtility.
26 L<http://msdn.microsoft.com/en-us/library/ms441219.aspx>
27  
28 This module does the following things:
29 Checks whether the Taiwan calendar is hidden based on the specified Web site and locale ID.
30 Checks if the China Gov really Lost Their Brain based on the specified Web site and locale ID.
31 Checks if Bill-GAY$ and his 'Stuffz' lost thier Balls at Halloween based on the specified Web site and locale ID.
32  
33  
34 use ACME::MSDN::SPUtility;
35  
36 my $fool = ACME::MSDN::SPUtility->new( $SPWeb, int $localeId);
37 say 'Hello, Taiwan!' if not $fool->HideTaiwan;
38 STDERR->say("I can't speak well if I don't have a brain!") if $fool->HideChina;
39 say STDERR 'Plz find my balls for me and give it back to me. I lost all of them!' if $fool->HideMicroSoft;
40  
41 =head1 FUNCTIONS
42  
43 =head2 new
44  
45 Get a SPUtility object.
46  
47 =cut
48  
49 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
50 0 my $this = shift;
51 0 ▶ my $class = ref($this) || $this;
Condition0%0/3
ref $this || $this
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table0%0/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
52 0 my $self = {};
53 0 bless $self, $class;
54 #$self->initialize();
55 0 return $self;
56 }
57  
58 =head2 HideTaiwan
59  
60 Checks whether the Taiwan calendar is hidden based on the specified Web site and locale ID.
61  
62 =cut
63  
64 0 ▶sub HideTaiwan {
Subroutine HideTaiwan: not called CC=1 SCAR=6.9
Pod documented
65 0 my $self = shift;
66 0 my ($spWeb, $localeId) = @_;
67
68 0 print "Taiwan is definitely a Contry already, and should never hide. Is china scared by this?";
69 0 return undef;
70 };
71  
72 =head2 HideChina
73  
74 Checks if the China Gov really Lost Their Brain based on the specified Web site and locale ID.
75  
76 =cut
77  
78 0 ▶sub HideChina {
Subroutine HideChina: not called CC=1 SCAR=6.9
Pod documented
79 0 my $self = shift;
80 0 my ($spWeb, $localeId) = @_;
81
82 0 print "fsck the dumb China gov";
83 0 return 1;
84 }
85  
86 =head2 HideMicroSoft
87  
88 Checks if Bill-GAY$ and his 'Stuffz' lost thier Balls at Halloween based on the specified Web site and locale ID.
89  
90 =cut
91  
92 0 ▶sub HideMicroSoft {
Subroutine HideMicroSoft: not called CC=1 SCAR=6.9
Pod documented
93 0 my $self = shift;
94 0 my ($spWeb, $localeId) = @_;
95
96 0 print 'Bill-Gay$ and Micro$oft Stuff$ lost their Ballz, did you see them?';
97 0 return 1;
98 }
99  
100 =head1 AUTHOR
101  
102 BlueT - Matthew Lien - 練喆明, C<< <BlueT at BlueT.org> >>
103  
104 =head1 BUGS
105  
106 Please report any bugs or feature requests to C<bug-acme-msdn-sputility at rt.cpan.org>, or through
107 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ACME-MSDN-SPUtility>. I will be notified, and then you'll
108 automatically be notified of progress on your bug as I make changes.
109  
110  
111  
112  
113 =head1 SUPPORT
114  
115 You can find documentation for this module with the perldoc command.
116  
117 perldoc ACME::MSDN::SPUtility
118  
119  
120 You can also look for information at:
121  
122 =over 4
123  
124 =item * RT: CPAN's request tracker
125  
126 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=ACME-MSDN-SPUtility>
127  
128 =item * AnnoCPAN: Annotated CPAN documentation
129  
130 L<http://annocpan.org/dist/ACME-MSDN-SPUtility>
131  
132 =item * CPAN Ratings
133  
134 L<http://cpanratings.perl.org/d/ACME-MSDN-SPUtility>
135  
136 =item * Search CPAN
137  
138 L<http://search.cpan.org/dist/ACME-MSDN-SPUtility>
139  
140 =back
141  
142  
143 =head1 ACKNOWLEDGEMENTS
144  
145  
146 =head1 COPYRIGHT & LICENSE
147  
148 Copyright 2009 BlueT - Matthew Lien - 練喆明, all rights reserved.
149  
150 This program is free software; you can redistribute it and/or modify it
151 under the same terms as Perl itself.
152  
153  
154 =cut
155  
156 2 1; # End of ACME::MSDN::SPUtility
↑ Summary