/[webpac2]/trunk/lib/WebPAC/Output.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

Diff of /trunk/lib/WebPAC/Output.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by dpavlin, Sat Jun 25 20:23:23 2005 UTC revision 1068 by dpavlin, Tue Nov 27 23:45:28 2007 UTC
# Line 3  package WebPAC::Output; Line 3  package WebPAC::Output;
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6    use Carp qw/confess/;
7    
8  =head1 NAME  =head1 NAME
9    
10  WebPAC::Output - The great new WebPAC::Output!  WebPAC::Output - The great new WebPAC::Output!
# Line 17  our $VERSION = '0.01'; Line 19  our $VERSION = '0.01';
19    
20  =head1 SYNOPSIS  =head1 SYNOPSIS
21    
22  Quick summary of what the module does.  Common routines for output formats
23    
24  Perhaps a little code snippet.  =head1 FUNCTIONS
25    
26      use WebPAC::Output;  =head2 ds_to_hash
27    
28      my $foo = WebPAC::Output->new();    my $hash = $self->ds_to_hash( $ds, 'display'
29      ...          disable_key_mungle => 1,
30      );
31    
32  =head1 EXPORT  =cut
33    
34  A list of functions that can be exported.  You can delete this section  sub ds_to_hash {
35  if you don't export anything, such as for a purely object-oriented module.          my $self = shift;
36    
37  =head1 FUNCTIONS          my $ds = shift || confess "need ds";
38            my $type = shift || confess "need type";
39    
40  =head2 function1          my $opt = {@_};
41    
42  =cut          my $hash;
43    
44  sub function1 {          foreach my $t ( keys %$ds ) {
45  }                  my $name = $t;
46                    if ( ! $opt->{disable_key_mungle} ) {
47                            $name = lc($name);
48                            $name =~ s/\W+/_/g;
49                    }
50    
51  =head2 function2                  # FIXME get rid of non hash values in data_structure for consistency?
52                    next unless ref($ds->{$t}) eq 'HASH';
53    
54  =cut                  if ( defined( $ds->{$t}->{$type} ) ) {
55                            $hash->{$name} = $ds->{$t}->{$type};
56                    }
57            }
58    
59  sub function2 {          return $hash;
60  }  }
61    
62    
63  =head1 AUTHOR  =head1 AUTHOR
64    
65  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
66    
 =head1 BUGS  
   
 Please report any bugs or feature requests to  
 C<bug-webpac-output@rt.cpan.org>, or through the web interface at  
 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebPAC>.  
 I will be notified, and then you'll automatically be notified of progress on  
 your bug as I make changes.  
   
 =head1 ACKNOWLEDGEMENTS  
   
67  =head1 COPYRIGHT & LICENSE  =head1 COPYRIGHT & LICENSE
68    
69  Copyright 2005 Dobrica Pavlinusic, All Rights Reserved.  Copyright 2005-2007 Dobrica Pavlinusic, All Rights Reserved.
70    
71  This program is free software; you can redistribute it and/or modify it  This program is free software; you can redistribute it and/or modify it
72  under the same terms as Perl itself.  under the same terms as Perl itself.

Legend:
Removed from v.1  
changed lines
  Added in v.1068

  ViewVC Help
Powered by ViewVC 1.1.26