/[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 40 - (show annotations)
Sun Mar 30 15:02:55 2008 UTC (14 years, 8 months ago) by dpavlin
File size: 611 byte(s)
Turn A3C::LDAP into real object which looks more like Jifty::Collection
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 my $ldap = A3C::LDAP->new;
19 div {
20 $ldap->search(
21 base => 'dc=skole,dc=hr',
22 filter => '(objectClass=hrEduOrg)',
23 sizelimit => 10,
24 );
25 while ( my $entry = $ldap->next ) {
26 #warn $entry->dump;
27 ul {
28 foreach my $attr ( $entry->attributes ) {
29 li {
30 tt { $attr }
31 span { dump( $entry->get_value( $attr ) ) }
32 }
33 }
34 }
35 }
36 }
37 };
38

  ViewVC Help
Powered by ViewVC 1.1.26