[Catalyst-commits] r14562 - in trunk/Catalyst-Model-LDAP: . lib/Catalyst/Helper/Model lib/Catalyst/Model lib/Catalyst/Model/LDAP
ghenry at dev.catalyst.perl.org
ghenry at dev.catalyst.perl.org
Fri Jul 14 21:50:16 GMT 2017
Author: ghenry
Date: 2017-07-14 21:50:16 +0000 (Fri, 14 Jul 2017)
New Revision: 14562
Added:
trunk/Catalyst-Model-LDAP/dist.ini
trunk/Catalyst-Model-LDAP/weaver.ini
Removed:
trunk/Catalyst-Model-LDAP/MANIFEST.SKIP
trunk/Catalyst-Model-LDAP/Makefile.PL
Modified:
trunk/Catalyst-Model-LDAP/Changes
trunk/Catalyst-Model-LDAP/lib/Catalyst/Helper/Model/LDAP.pm
trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP.pm
trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Connection.pm
trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Entry.pm
trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Search.pm
Log:
Migrating to Dist::Zilla. Mainly due to '[rt.cpan.org #122481] MYMETA must not be included', but also a good time to do it.
Modified: trunk/Catalyst-Model-LDAP/Changes
===================================================================
--- trunk/Catalyst-Model-LDAP/Changes 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/Changes 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,5 +1,10 @@
Revision history for Perl extension Catalyst::Model::LDAP.
+0.19 Fri Jul 14 20:22:00 BST 2017
+ - Migrate to Dist::Zilla due to:
+ [rt.cpan.org #122481] MYMETA must not be included
+ https://rt.cpan.org/Ticket/Display.html?id=122481
+
0.18 Mon Sep 5 15:23:00 BST 2016
- Authz added to support Net::LDAP::Control::ProxyAuth
- Raw option added to support UTF8
@@ -8,7 +13,7 @@
in the control array of Net::LDAP search objects
- Net::LDAP 0.65 added for min version as the current
required version is so old and does not support ProxyAuth
- - Makefile.pl updated for ProxyAuth
+ - Makefile.PL updated for ProxyAuth
0.17 Thu Dec 3 16:48:27 EST 2009
- Fix a problem when the Entry and Connection classes
Deleted: trunk/Catalyst-Model-LDAP/MANIFEST.SKIP
===================================================================
--- trunk/Catalyst-Model-LDAP/MANIFEST.SKIP 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/MANIFEST.SKIP 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,27 +0,0 @@
-# Version control files and directories
-\bRCS\b
-\bCVS\b
-,v$
-\B\.svn\b
-
-# MakeMaker-generated files and directories
-^MANIFEST\.
-^MakeMaker-\d
-^Makefile$
-\bblib\b
-\bpm_to_blib\b
-
-# Module::Build-generated files and directories
-^Build$
-\b_build\b
-
-# Devel::Cover-generated files and directories
-\bcover_db\b
-
-# Backup and temporary files
-~$
-\.tmp$
-\.old$
-\.bak$
-\#$
-\.#
Deleted: trunk/Catalyst-Model-LDAP/Makefile.PL
===================================================================
--- trunk/Catalyst-Model-LDAP/Makefile.PL 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/Makefile.PL 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,29 +0,0 @@
-use inc::Module::Install 0.87;
-
-perl_version '5.8.1';
-
-name 'Catalyst-Model-LDAP';
-all_from 'lib/Catalyst/Model/LDAP.pm';
-
-requires 'Carp';
-requires 'Catalyst' => '5.62'; # ACCEPT_CONTEXT
-requires 'Catalyst::Model';
-requires 'Class::Accessor::Fast';
-requires 'Data::Page';
-requires 'MRO::Compat';
-requires 'Net::LDAP' => '0.65';
-requires 'Net::LDAP::Constant';
-requires 'Net::LDAP::Control::Sort';
-requires 'Net::LDAP::Control::VLV';
-requires 'Net::LDAP::Entry';
-requires 'Net::LDAP::Search';
-requires 'Net::LDAP::Control::ProxyAuth' => '1.09';
-
-build_requires 'Data::Dumper';
-build_requires 'FindBin';
-build_requires 'Catalyst::Test';
-build_requires 'Test::More';
-
-resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Model-LDAP/';
-
-WriteAll;
Added: trunk/Catalyst-Model-LDAP/dist.ini
===================================================================
--- trunk/Catalyst-Model-LDAP/dist.ini (rev 0)
+++ trunk/Catalyst-Model-LDAP/dist.ini 2017-07-14 21:50:16 UTC (rev 14562)
@@ -0,0 +1,35 @@
+name = Catalyst-Model-LDAP
+version = 0.19
+
+[@Basic]
+
+[Prereqs]
+Carp = 0
+Catalyst = 5.62
+Catalyst::Model = 0
+Class::Accessor::Fast = 0
+Data::Page = 0
+MRO::Compat = 0
+Net::LDAP = 0.65
+Net::LDAP::Constant = 0
+Net::LDAP::Control::Sort = 0
+Net::LDAP::Control::VLV = 0
+Net::LDAP::Entry = 0
+Net::LDAP::Search = 0
+Net::LDAP::Control::ProxyAuth = 1.09
+
+[AutoPrereqs]
+
+[PodWeaver]
+[Test::NoTabs]
+[Test::EOL]
+[NextRelease]
+[CheckChangeLog]
+filename = Changes
+
+[Repository]
+repository = http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Model-LDAP
+
+[Test::Perl::Critic]
+[PodCoverageTests]
+[PodSyntaxTests]
Modified: trunk/Catalyst-Model-LDAP/lib/Catalyst/Helper/Model/LDAP.pm
===================================================================
--- trunk/Catalyst-Model-LDAP/lib/Catalyst/Helper/Model/LDAP.pm 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/lib/Catalyst/Helper/Model/LDAP.pm 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,12 +1,9 @@
package Catalyst::Helper::Model::LDAP;
+# ABSTRACT: Helper for LDAP models
use strict;
use warnings;
-=head1 NAME
-
-Catalyst::Helper::Model::LDAP - Helper for LDAP models
-
=head1 SYNOPSIS
script/myapp_create.pl model Person LDAP ldap.ufl.edu ou=People,dc=ufl,dc=edu dn=admin,dc=ufl,dc=edu mypass 1
@@ -67,15 +64,15 @@
=cut
sub mk_compclass {
- my ($self, $helper, $host, $base, $dn, $password, $start_tls) = @_;
+ my ( $self, $helper, $host, $base, $dn, $password, $start_tls ) = @_;
- $helper->{host} = $host || '';
- $helper->{base} = $base || '';
- $helper->{dn} = $dn || '';
- $helper->{password} = $password || '';
+ $helper->{host} = $host || '';
+ $helper->{base} = $base || '';
+ $helper->{dn} = $dn || '';
+ $helper->{password} = $password || '';
$helper->{start_tls} = $start_tls ? 1 : 0;
- $helper->render_file('modelclass', $helper->{file});
+ $helper->render_file( 'modelclass', $helper->{file} );
return 1;
}
@@ -87,9 +84,9 @@
=cut
sub mk_comptest {
- my ($self, $helper) = @_;
+ my ( $self, $helper ) = @_;
- $helper->render_file('modeltest', $helper->{test});
+ $helper->render_file( 'modeltest', $helper->{test} );
}
=head1 SEE ALSO
Modified: trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Connection.pm
===================================================================
--- trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Connection.pm 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Connection.pm 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,4 +1,5 @@
package Catalyst::Model::LDAP::Connection;
+# ABSTRACT: Convenience methods for Net::LDAP
use strict;
use warnings;
@@ -15,10 +16,6 @@
__PACKAGE__->mk_accessors(qw/base options entry_class/);
-=head1 NAME
-
-Catalyst::Model::LDAP::Connection - Convenience methods for Net::LDAP
-
=head1 DESCRIPTION
Subclass of L<Net::LDAP>, which adds paging support and an additional
@@ -137,7 +134,7 @@
$self->next::method( $dn ? ( $dn, %args ) : %args );
}
-=head2 search
+=head2 search
Search the configured directory using a given filter. For example:
@@ -162,7 +159,7 @@
If this option is not given, attribute values are treated as byte strings.
-Generally, you'll only ever need to do this if using RFC'd LDAP attributes
+Generally, you'll only ever need to do this if using RFC'd LDAP attributes
and not a custom LDAP schema:
raw => qr/(?i:^jpegPhoto|;binary)/,
@@ -212,7 +209,6 @@
if ( my $authz = delete $args{authz} ) {
my $authz =
Net::LDAP::Control::ProxyAuth->new( authzID => q{dn:} . $authz );
-
$args{control} = [ @{ $args{control} || [] }, $authz ];
}
Modified: trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Entry.pm
===================================================================
--- trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Entry.pm 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Entry.pm 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,4 +1,5 @@
package Catalyst::Model::LDAP::Entry;
+# ABSTRACT: Convenience methods for Net::LDAP::Entry
use strict;
use warnings;
@@ -8,10 +9,6 @@
__PACKAGE__->mk_accessors(qw/_ldap_client/);
-=head1 NAME
-
-Catalyst::Model::LDAP::Entry - Convenience methods for Net::LDAP::Entry
-
=head1 SYNOPSIS
# In your controller
@@ -81,11 +78,11 @@
=cut
sub new {
- my ($class, $dn, %attributes) = @_;
+ my ( $class, $dn, %attributes ) = @_;
my $client = delete $attributes{_ldap_client};
- my $self = $class->next::method($dn, %attributes);
+ my $self = $class->next::method( $dn, %attributes );
if ($client) {
$self->_ldap_client($client);
@@ -102,11 +99,11 @@
=cut
sub update {
- my $self = shift;
+ my $self = shift;
my $client = shift || $self->_ldap_client;
croak 'No LDAP client provided to update' unless $client;
- return $self->next::method($client, @_);
+ return $self->next::method( $client, @_ );
}
=head2 can
@@ -117,22 +114,23 @@
=cut
sub can {
- my ($self, $method) = @_;
+ my ( $self, $method ) = @_;
return 0 unless ref($self);
$self->exists($method) || $self->SUPER::can($method);
}
sub AUTOLOAD {
- my ($self, @args) = @_;
+ my ( $self, @args ) = @_;
- my ($attribute) = (our $AUTOLOAD =~ /([^:]+)$/);
+ my ($attribute) = ( our $AUTOLOAD =~ /([^:]+)$/ );
return if $attribute eq 'DESTROY';
- croak qq[Can't locate object method "$attribute" via package "] . ref($self) . qq["]
- unless $self->exists($attribute);
+ croak qq[Can't locate object method "$attribute" via package "]
+ . ref($self) . qq["]
+ unless $self->exists($attribute);
- if (scalar @args) {
- $self->replace($attribute, @args);
+ if ( scalar @args ) {
+ $self->replace( $attribute, @args );
}
return $self->get_value($attribute);
Modified: trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Search.pm
===================================================================
--- trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Search.pm 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP/Search.pm 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,13 +1,10 @@
package Catalyst::Model::LDAP::Search;
+# ABSTRACT: Convenience methods for Net::LDAP::Search
use strict;
use warnings;
use base qw/Net::LDAP::Search/;
-=head1 NAME
-
-Catalyst::Model::LDAP::Search - Convenience methods for Net::LDAP::Search
-
=head1 DESCRIPTION
Subclass of L<Net::LDAP::Search>, with an additional method to rebless
@@ -23,14 +20,14 @@
=cut
sub init {
- my ($self, $class) = @_;
+ my ( $self, $class ) = @_;
- eval "require $class";
+ eval { require $class };
die $@ if $@;
- foreach my $entry (@{ $self->{entries} }) {
+ foreach my $entry ( @{ $self->{entries} } ) {
bless $entry, $class;
- $entry->_ldap_client($self->parent);
+ $entry->_ldap_client( $self->parent );
}
}
Modified: trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP.pm
===================================================================
--- trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP.pm 2016-09-05 14:36:10 UTC (rev 14561)
+++ trunk/Catalyst-Model-LDAP/lib/Catalyst/Model/LDAP.pm 2017-07-14 21:50:16 UTC (rev 14562)
@@ -1,16 +1,13 @@
package Catalyst::Model::LDAP;
+# ABSTRACT: LDAP model class for Catalyst
use strict;
use warnings;
use base qw/Catalyst::Model/;
use Carp qw/croak/;
-our $VERSION = '0.18';
+our $VERSION = '0.19';
-=head1 NAME
-
-Catalyst::Model::LDAP - LDAP model class for Catalyst
-
=head1 SYNOPSIS
# Use the Catalyst helper
@@ -129,10 +126,10 @@
# Remove Catalyst-specific parameters (e.g. catalyst_component_name), which
# cause issues Net::LDAP
- delete $args{$_} for (grep { /^_?catalyst/ } keys %args);
+ delete $args{$_} for ( grep { /^_?catalyst/ } keys %args );
my $class = $args{connection_class} || 'Catalyst::Model::LDAP::Connection';
- eval "require $class";
+ eval { require $class };
die $@ if $@;
my $conn = $class->new(%args);
Added: trunk/Catalyst-Model-LDAP/weaver.ini
===================================================================
--- trunk/Catalyst-Model-LDAP/weaver.ini (rev 0)
+++ trunk/Catalyst-Model-LDAP/weaver.ini 2017-07-14 21:50:16 UTC (rev 14562)
@@ -0,0 +1,4 @@
+[@Default]
+
+[-Transformer]
+transformer = List
More information about the Catalyst-commits
mailing list