Added some basic POD for WebGUI::{Command,Deprecate}.pm
This commit is contained in:
parent
01062458d9
commit
00738a17b2
2 changed files with 40 additions and 0 deletions
|
|
@ -3,6 +3,23 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use App::Cmd::Setup -app;
|
use App::Cmd::Setup -app;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
WebGUI::Command - Base class for WebGUI commands
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
use WebGUI::Command;
|
||||||
|
|
||||||
|
#subroutines that you'd like to call via command line scripts or UI methods
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
This is a subclass of App::Cmd::Setup.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
|
||||||
use constant plugin_search_path => __PACKAGE__;
|
use constant plugin_search_path => __PACKAGE__;
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,29 @@ WebGUI::Deprecate - Warn about subroutine deprecations
|
||||||
|
|
||||||
Deprecate a subroutine, spitting out a warning whenever it is used.
|
Deprecate a subroutine, spitting out a warning whenever it is used.
|
||||||
|
|
||||||
|
=head2 derp ($message)
|
||||||
|
|
||||||
|
derp is short for DEprecation caRP. Similar to carp, derp will emit the message
|
||||||
|
on STDERR. If the message does not end with a newline, it will append a strack trace
|
||||||
|
to the message. Each message is only printed once.
|
||||||
|
|
||||||
|
=head3 $message
|
||||||
|
|
||||||
|
The message to print.
|
||||||
|
|
||||||
|
=head2 deprecate ($old_method, $new_method)
|
||||||
|
|
||||||
|
This subroutine allows you to replace an old method with a new method and to emit a warning
|
||||||
|
to the user (developer) that they should be using something else.
|
||||||
|
|
||||||
|
=head3 $old_method
|
||||||
|
|
||||||
|
The old, deprecated method.
|
||||||
|
|
||||||
|
=head3 $new_method
|
||||||
|
|
||||||
|
The new, shiny method that should be called in its place.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue