[Bps-public-commit] plient branch, master, updated. 6bbea5d904fd6591af667931eef637248a2ad7ad
? sunnavy
sunnavy at bestpractical.com
Wed Apr 21 14:01:25 EDT 2010
The branch, master has been updated
via 6bbea5d904fd6591af667931eef637248a2ad7ad (commit)
from 2e757c42fbf91fa6493f6489df57e96242e9df80 (commit)
Summary of changes:
lib/Plient.pm | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 6bbea5d904fd6591af667931eef637248a2ad7ad
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Apr 22 02:01:20 2010 +0800
add Plient->available($protocol, $method) sub
diff --git a/lib/Plient.pm b/lib/Plient.pm
index 0295ef4..c5c7094 100644
--- a/lib/Plient.pm
+++ b/lib/Plient.pm
@@ -74,6 +74,16 @@ sub _dispatch_protocol {
}
+sub available {
+ shift if $_[0] && $_[0] eq __PACKAGE__;
+ my ( $protocol, $method, $args ) = @_;
+ return unless $protocol;
+ $method ||= 'get';
+ my $class = _dispatch_protocol(lc $protocol);
+ return unless $class;
+ return $class->support_method( $method, $args );
+}
+
sub dispatch {
my ( $method, $uri, $args ) = @_;
$method = lc $method;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list