/[A3C]/lib/A3C/View.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /lib/A3C/View.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37 - (show annotations)
Sun Mar 30 02:33:01 2008 UTC (16 years ago) by dpavlin
File size: 607 byte(s)
simple Template::Declare view to display LDAP dump
1 package A3C::View;
2
3 use strict;
4 use warnings;
5
6 use Jifty::View::Declare -base;
7 use A3C::LDAP;
8
9 use Data::Dump qw/dump/;
10
11
12 template '/skole' => page {
13 h1 { _('Schools in system') };
14 show 'skole_sve';
15 };
16
17 private template 'skole_sve' => sub {
18 div {
19 my $search = A3C::LDAP->search(
20 base => 'dc=skole,dc=hr',
21 filter => '(objectClass=hrEduOrg)',
22 sizelimit => 10,
23 );
24 while ( my $entry = $search->shift_entry ) {
25 #warn $entry->dump;
26 ul {
27 foreach my $attr ( $entry->attributes ) {
28 li {
29 tt { $attr }
30 span { dump( $entry->get_value( $attr ) }
31 }
32 }
33 }
34 }
35 }
36 };
37

  ViewVC Help
Powered by ViewVC 1.1.26