Session::State::Cookie
+FrBr::Books::Plugin::Author
+ +FrBr::Books::Plugin::Bindungsart
+FrBr::Books::Plugin::BookAdd
+FrBr::Books::Plugin::Ort
+FrBr::Books::Plugin::Serie
use FrBr::Common;
use FrBr::Books::Util::Book;
-use FrBr::Books::Util::Bindungsart;
use FrBr::Books::Util::Category;
=head1 NAME
$c->log->debug( get_output_string( $K . "Autoren gesamt: ", $autor_list_complete ) );
$c->stash->{'autor_list'} = {};
+# $c->stash->{'autor_list_detail'} = {};
$c->stash->{'autor_array_sorted'} = [];
for my $autor ( @$autor_list_complete ) {
$c->stash->{'autor_list'}{ $autor->{'id'} } = $autor->{'name'};
+# $c->stash->{'autor_list_detail'}{ $autor->{'id'} } = $autor;
push @{$c->stash->{'autor_array_sorted'}}, $autor->{'id'};
}
$c->log->debug( get_output_string( $K . "Autoren-Hash: ", $c->stash->{'autor_list'} ) );
$c->log->debug( get_output_string( $K . "Aufbewahrungsorte: ", $c->stash->{'ortsliste'} ) );
# Bindungsarten zusammensammeln
- my $bart_liste = get_bindungsarten_list($c);
+ my $bart_liste = $c->b_get_bindungsarten_list();
$c->log->debug( get_output_string( $K . "Bindungsarten gesamt: ", $bart_liste ) );
$c->stash->{'bindungsartenliste'} = {};
$c->stash->{'bindungsarten_ids'} = [];
--- /dev/null
+package FrBr::Books::Plugin::Bindungsart;
+
+# $Id$
+# $URL$
+
+use strict;
+use warnings;
+
+use Carp qw/croak/;
+use FrBr::Common;
+
+our $VERSION = '0.2';
+{
+ my ($rev) = '$Revision$' =~ /(\d+)/;
+ $VERSION = sprintf( $VERSION . ".%d", $rev );
+}
+
+# &get_bindungsarten_list
+
+=head1 NAME
+
+FrBr::Books::Plugin::Bindungsart - Plugin-Modul fuer Funktionen rund um Bindungsarten
+
+=head1 METHODS
+
+=cut
+
+#-----------------------------------------------------------------------------------
+
+=head2 $c->b_get_bindungsarten_list( $params )
+
+Sammelt alle Bindungsarten zusammen.
+
+Folgende benannte Parameter koennen ueber $params uebergeben werden:
+
+Rueckgabe: Eine Array-Ref von Hash-Refs mit allen Bindungsarten, die den uebergebenen Suchkriterien entsprechen:
+
+ $res = [
+ { 'id' => 1,
+ 'name' => 'Hartcover',
+ },
+ { 'id' => 2,
+ ...
+ },
+ ...
+ ];
+
+Die Liste ist nach den Bindungsart-Namen alphabetisch sortiert.
+
+=cut
+
+sub b_get_bindungsarten_list {
+
+ my $c = shift;
+ my $K = ( caller(0) )[3] . "(): ";
+
+ $c->log->debug( $K . "aufgerufen." ) if $c->stash->{'debug_level'} > 2;
+
+ my $params = {};
+ if ( ref($_[0]) and ref($_[0]) eq 'HASH' ) {
+ $params = $_[0];
+ }
+ else {
+ %$params = @_;
+ }
+ $c->log->debug( get_output_string( $K, "Uebergebene Parameter: ", $params ) ) if $c->stash->{'debug_level'} >= 2;
+
+ my $list = [];
+
+ my $search_params = undef;
+
+ my $other_params = {};
+ $other_params->{'order_by'} = [ 'art_name' ];
+ $other_params->{'select'} = [
+ 'id',
+ 'art_name',
+ ];
+ $other_params->{'as'} = [
+ 'id',
+ 'art_name',
+ ];
+
+ for my $art ( $c->model('Schema::Bindungsarten')->search( $search_params, $other_params )->all() ) {
+ my $bart = {};
+ $bart->{'id'} = $art->id();
+ $bart->{'name'} = $art->art_name();
+ push @$list, $bart;
+ }
+
+ return $list;
+}
+
+#-----------------------------------------------------------------------------------
+
+=head1 AUTHOR
+
+Frank Brehm
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
+
+__END__
+
+# vim: noai : ts=4 fenc=utf-8 filetype=perl expandtab :
+++ /dev/null
-package FrBr::Books::Util::Bindungsart;
-
-# $Id$
-# $URL$
-
-use strict;
-use warnings;
-
-use FrBr::Common;
-
-# Export-Deklarationen
-
-BEGIN {
-
- use Exporter();
- our ( $VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
-
- # set the version for version checking
- $VERSION = 0.1;
- my ($rev) = '$Revision$' =~ /(\d+)/;
- $VERSION = sprintf( $VERSION . ".%d", $rev );
-
- @ISA = qw(Exporter);
- @EXPORT = qw(
- &get_bindungsarten_list
- );
-
- #%EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
-
- # your exported package globals go here,
- # as well as any optionally exported functions
- #@EXPORT_OK = qw($Var1 %Hashit &func3);
-} ## end BEGIN
-
-our @EXPORT_OK;
-
-=head1 NAME
-
-FrBr::Books::Util::Bindungsart - Modul fuer Funktionen rund um Bindungsarten
-
-=head1 METHODS
-
-=cut
-
-#-----------------------------------------------------------------------------------
-
-=head2 get_bindungsarten_list( $c, $params )
-
-Sammelt alle Bindungsarten zusammen.
-
-Folgende benannte Parameter koennen ueber $params uebergeben werden:
-
-Rueckgabe: Eine Array-Ref von Hash-Refs mit allen Bindungsarten, die den uebergebenen Suchkriterien entsprechen:
-
- $res = [
- { 'id' => 1,
- 'name' => 'Hartcover',
- },
- { 'id' => 2,
- ...
- },
- ...
- ];
-
-Die Liste ist nach den Bindungsart-Namen alphabetisch sortiert.
-
-=cut
-
-sub get_bindungsarten_list {
-
- my $c = shift;
- my $K = ( caller(0) )[3] . "(): ";
-
- $c->log->debug( $K . "aufgerufen." ) if $c->stash->{'debug_level'} > 2;
-
- my $params = {};
- if ( ref($_[0]) and ref($_[0]) eq 'HASH' ) {
- $params = $_[0];
- }
- else {
- %$params = @_;
- }
- $c->log->debug( get_output_string( $K, "Uebergebene Parameter: ", $params ) ) if $c->stash->{'debug_level'} >= 2;
-
- my $list = [];
-
- my $search_params = undef;
-
- my $other_params = {};
- $other_params->{'order_by'} = [ 'art_name' ];
- $other_params->{'select'} = [
- 'id',
- 'art_name',
- ];
- $other_params->{'as'} = [
- 'id',
- 'art_name',
- ];
-
- for my $art ( $c->model('Schema::Bindungsarten')->search( $search_params, $other_params )->all() ) {
- my $bart = {};
- $bart->{'id'} = $art->id();
- $bart->{'name'} = $art->art_name();
- push @$list, $bart;
- }
-
- return $list;
-}
-
-#-----------------------------------------------------------------------------------
-
-=head1 AUTHOR
-
-Frank Brehm
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
-1;
-
-__END__
-
-# vim: noai : ts=4 fenc=utf-8 filetype=perl expandtab :