line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Datahub::Factory::KMSKA; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
53191
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
1; |
8
|
|
|
|
|
|
|
__END__ |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=encoding utf-8 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Datahub::Factory::Importer::KMSKA - Import data from the L<TMS|http://www.gallerysystems.com/products-and-services/tms/> instance of the L<KMSKA|http://kmska.be/nl/> |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use Datahub::Factory::Importer::KMSKA; |
19
|
|
|
|
|
|
|
use Data::Dumper qw(Dumper); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $kmska = Datahub::Factory::Importer::KMSKA->new( |
22
|
|
|
|
|
|
|
db_host => 'localhost', |
23
|
|
|
|
|
|
|
db_name => 'kmska', |
24
|
|
|
|
|
|
|
db_user => 'kmska', |
25
|
|
|
|
|
|
|
db_password => 'kmska' |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
$kmska->importer->each(sub { |
29
|
|
|
|
|
|
|
my $item = shift; |
30
|
|
|
|
|
|
|
print Dumper($item); |
31
|
|
|
|
|
|
|
}); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 DESCRIPTION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Datahub::Factory::Importer::KMSKA uses L<Catmandu|http://librecat.org/Catmandu/> to fetch a list of records |
36
|
|
|
|
|
|
|
from a local instance of L<TMS|http://www.gallerysystems.com/products-and-services/tms/> as it is configured in |
37
|
|
|
|
|
|
|
the L<KMSKA|http://kmska.be/nl/>. This module does not give you access to the database of the museum, but |
38
|
|
|
|
|
|
|
allows you to pull and parse data from it if you already have access. For a more generic interface to TMS, |
39
|
|
|
|
|
|
|
see L<Datahub::Factory::Importer::TMS>. Both modules require however that the TMS database is stored in a MySQL |
40
|
|
|
|
|
|
|
(or equivalent) system. It will not work with MS SQL (which TMS uses). |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 PARAMETERS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=over |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item C<db_host> |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Host (IP or FQDN) of the MySQL database. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item C<db_name> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Name of the MySQL database. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item C<db_user> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Username to connect to the database. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item C<db_password> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Password for the user. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=back |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item C<importer> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
A L<Importer|Catmandu::Importer> that can be used in your script. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 AUTHOR |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Pieter De Praetere E<lt>pieter at packed.be E<gt> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 COPYRIGHT |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Copyright 2017- PACKED vzw |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 LICENSE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
85
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 SEE ALSO |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
L<Datahub::Factory> |
90
|
|
|
|
|
|
|
L<Datahub::Factory::Importer::TMS> |
91
|
|
|
|
|
|
|
L<Catmandu> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |