Skip to content

Commit 00738a1

Browse files
committedOct 20, 2011
Added some basic POD for WebGUI::{Command,Deprecate}.pm
1 parent 0106245 commit 00738a1

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
 

‎lib/WebGUI/Command.pm

+17
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ use strict;
33
use warnings;
44
use App::Cmd::Setup -app;
55

6+
=head1 NAME
7+
8+
WebGUI::Command - Base class for WebGUI commands
9+
10+
=head1 SYNOPSIS
11+
12+
use WebGUI::Command;
13+
14+
#subroutines that you'd like to call via command line scripts or UI methods
15+
16+
=head1 DESCRIPTION
17+
18+
This is a subclass of App::Cmd::Setup.
19+
20+
=cut
21+
22+
623
use constant plugin_search_path => __PACKAGE__;
724

825
1;

‎lib/WebGUI/Deprecate.pm

+23
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,29 @@ WebGUI::Deprecate - Warn about subroutine deprecations
1515
1616
Deprecate a subroutine, spitting out a warning whenever it is used.
1717
18+
=head2 derp ($message)
19+
20+
derp is short for DEprecation caRP. Similar to carp, derp will emit the message
21+
on STDERR. If the message does not end with a newline, it will append a strack trace
22+
to the message. Each message is only printed once.
23+
24+
=head3 $message
25+
26+
The message to print.
27+
28+
=head2 deprecate ($old_method, $new_method)
29+
30+
This subroutine allows you to replace an old method with a new method and to emit a warning
31+
to the user (developer) that they should be using something else.
32+
33+
=head3 $old_method
34+
35+
The old, deprecated method.
36+
37+
=head3 $new_method
38+
39+
The new, shiny method that should be called in its place.
40+
1841
=cut
1942

2043
use strict;

0 commit comments

Comments
 (0)
Please sign in to comment.