[Bast-commits] r3663 - in trunk/Net-LDAP-HTMLWidget: . lib/Net/LDAP
omega at dev.catalyst.perl.org
omega at dev.catalyst.perl.org
Wed Aug 8 12:18:08 GMT 2007
Author: omega
Date: 2007-08-08 12:18:08 +0100 (Wed, 08 Aug 2007)
New Revision: 3663
Modified:
trunk/Net-LDAP-HTMLWidget/
trunk/Net-LDAP-HTMLWidget/Changes
trunk/Net-LDAP-HTMLWidget/lib/Net/LDAP/HTMLWidget.pm
Log:
r15859 at andreas-marienborgs-computer: andreas | 2007-08-08 12:41:45 +0200
New release
Property changes on: trunk/Net-LDAP-HTMLWidget
___________________________________________________________________
Name: svk:merge
- ea49d7f7-7c45-40ca-be27-1349e20c1c07:/local/net-ldap-htmlwidget:15673
+ ea49d7f7-7c45-40ca-be27-1349e20c1c07:/local/net-ldap-htmlwidget:15859
Modified: trunk/Net-LDAP-HTMLWidget/Changes
===================================================================
--- trunk/Net-LDAP-HTMLWidget/Changes 2007-08-08 10:47:39 UTC (rev 3662)
+++ trunk/Net-LDAP-HTMLWidget/Changes 2007-08-08 11:18:08 UTC (rev 3663)
@@ -1,5 +1,8 @@
Revision history for Net-LDAP-HTMLWidget
+0.03 2007-08-08 12:39
+ Fixed a missing use Carp;
+
0.02 2007-07-17 14:39
Tuned in with later releases of HTML::Widget and the new API
Modified: trunk/Net-LDAP-HTMLWidget/lib/Net/LDAP/HTMLWidget.pm
===================================================================
--- trunk/Net-LDAP-HTMLWidget/lib/Net/LDAP/HTMLWidget.pm 2007-08-08 10:47:39 UTC (rev 3662)
+++ trunk/Net-LDAP-HTMLWidget/lib/Net/LDAP/HTMLWidget.pm 2007-08-08 11:18:08 UTC (rev 3663)
@@ -2,12 +2,16 @@
use strict;
use warnings;
-our $VERSION = '0.02';
+our $VERSION = '0.03';
# pod after __END__
+use Carp qw(croak);
sub fill_widget {
my ($self,$entry,$widget)=@_;
-
+ if (ref($entry) and $entry->isa('HTML::Widget')) {
+ $widget = $entry;
+ $entry = $self;
+ }
my @elements = $widget->find_elements;
foreach my $element ( @elements ) {
my $name=$element->name;
@@ -19,11 +23,16 @@
sub populate_from_widget {
my ($self,$entry,$result,$ldap)=@_;
+ if (ref($entry) and $entry->isa('HTML::Widget::Result')) {
+ $ldap = $result;
+ $result = $entry;
+ $entry = $self;
+ }
$ldap = $self if (ref $self && ($self->isa('Net::LDAP') || $self->isa('Catalyst::Model::LDAP::Connection')));
$ldap = $self->_ldap_client if (ref($self) and $self->isa('Catalyst::Model::LDAP::Entry') && $self->_ldap_client);
- croak("No LDAP connection") unless $ldap;
+ croak("No LDAP connection: " . ref($self)) unless $ldap;
foreach my $oc ( ref $entry->get_value('objectClass')
? @{$entry->get_value('objectClass')}
More information about the Bast-commits
mailing list