| 1 | package WWW::Garden::Design::Import::SQLite; | ||
| 2 | |||
| 3 | use Moo; | ||
| 4 | |||
| 5 | with 'WWW::Garden::Design::Import'; | ||
| 6 | |||
| 7 | use strict; | ||
| 8 | use warnings; | ||
| 9 | |||
| 10 | use Data::Dumper::Concise; # For Dumper(). | ||
| 11 | |||
| 12 | use Mojo::Log; | ||
| 13 | |||
| 14 | use Types::Standard qw/HashRef/; | ||
| 15 | |||
| 16 | use WWW::Garden::Design::Database::SQLite; | ||
| 17 | use WWW::Garden::Design::Util::Config; | ||
| 18 | |||
| 19 | has config => | ||
| 20 | ( | ||
| 21 | default => sub{WWW::Garden::Design::Util::Config -> new -> config}, | ||
| 22 | is => 'rw', | ||
| 23 | isa => HashRef, | ||
| 24 | required => 0, | ||
| 25 | ); | ||
| 26 | |||
| 27 | our $VERSION = '0.97'; | ||
| 28 | |||
| 29 | # ----------------------------------------------- | ||
| 30 | |||
| 31 | sub BUILD | ||
| 32 | { | ||
| 33 | my($self) = @_; | ||
| 34 | my($config) = $self -> config; | ||
| 35 | |||
| 36 | $self -> db | ||
| 37 | ( | ||
| 38 | WWW::Garden::Design::Database::SQLite -> new | ||
| 39 | ( | ||
| 40 | logger => Mojo::Log -> new(path => $$config{log_path}) | ||
| 41 | ) | ||
| 42 | ); | ||
| 43 | |||
| 44 | } # End of BUILD. | ||
| 45 | |||
| 46 | # ----------------------------------------------- | ||
| 47 | |||
| 48 | 1; | ||
| 49 | |||
| 50 | =pod | ||
| 51 | |||
| 52 | =head1 NAME | ||
| 53 | |||
| 54 | WWW::Garden::Design::Import::SQLite - Manage the 'flowers' database | ||
| 55 | |||
| 56 | =head1 Machine-Readable Change Log | ||
| 57 | |||
| 58 | The file Changes was converted into Changelog.ini by L<Module::Metadata::Changes>. | ||
| 59 | |||
| 60 | =head1 Version Numbers | ||
| 61 | |||
| 62 | Version numbers < 1.00 represent development versions. From 1.00 up, they are production versions. | ||
| 63 | |||
| 64 | =head1 Repository | ||
| 65 | |||
| 66 | L<https://github.com/ronsavage/WWW-Garden-Design> | ||
| 67 | |||
| 68 | =head1 Support | ||
| 69 | |||
| 70 | Email the author, or log a bug on RT: | ||
| 71 | |||
| 72 | L<https://rt.cpan.org/Public/Dist/Display.html?Name=WWW::Garden::Design>. | ||
| 73 | |||
| 74 | =head1 Author | ||
| 75 | |||
| 76 | L<WWW::Garden::Design> was written by Ron Savage I<E<lt>ron@savage.net.auE<gt>> in 2014. | ||
| 77 | |||
| 78 | My homepage: L<https://savage.net.au/>. | ||
| 79 | |||
| 80 | =head1 Copyright | ||
| 81 | |||
| 82 | Australian copyright (c) 2018, Ron Savage. | ||
| 83 | |||
| 84 | All Programs of mine are 'OSI Certified Open Source Software'; | ||
| 85 | you can redistribute them and/or modify them under the terms of | ||
| 86 | The Perl License, a copy of which is available at: | ||
| 87 | http://dev.perl.org/licenses/ | ||
| 88 | |||
| 89 | =cut |