From 00738a17b27d7027f4e526e067dd67fcdcf081e7 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 19 Oct 2011 17:04:40 -0700 Subject: [PATCH] Added some basic POD for WebGUI::{Command,Deprecate}.pm --- lib/WebGUI/Command.pm | 17 +++++++++++++++++ lib/WebGUI/Deprecate.pm | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/lib/WebGUI/Command.pm b/lib/WebGUI/Command.pm index f1696a9c2..91a614f28 100644 --- a/lib/WebGUI/Command.pm +++ b/lib/WebGUI/Command.pm @@ -3,6 +3,23 @@ use strict; use warnings; 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__; 1; diff --git a/lib/WebGUI/Deprecate.pm b/lib/WebGUI/Deprecate.pm index ec822e340..b0208a311 100644 --- a/lib/WebGUI/Deprecate.pm +++ b/lib/WebGUI/Deprecate.pm @@ -15,6 +15,29 @@ WebGUI::Deprecate - Warn about subroutine deprecations 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 use strict;