01 Oct 2014 22:29:05 UTC
- Distribution: EBook-Tools
- Module version: v0.5.4
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- KwaliteeBus factor: 0
- License: gpl_2
- Perl: v5.10.1
- Activity24 month
- Download (708.63KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- ACCESSOR METHODS
- MODIFIER METHODS
EBook::Tools::BISG - Class for downloading information from the Book Industry Study Group webpages
use EBook::Tools::BISG; my $bisg = EBook::Tools::BISG->new(); $bisg->download_bisac; $bisg->save_bisac; say $bisg->bisac('fic000000'); %bisac_codes = $bisg->bisac();
This will also require a DBD of your choice. The default is to use a local SQLite store.
Instantiates a new Ebook::Tools::BISG object.
The base url of the bisg.org website or mirror to use.
The Perl::DBI Data Source Name. Defaults to a sqlite store named bisac.sqlite in the user config directory.
Returns either the name matching a particular code (case-insensitive), or the hash of all BISAC codes and references with the keys in lower-case if no argument is provided.
Returns a list of all BISAC values (names) where either the key or the value for that entry matches a case-insensitive regular expression. If no argument is specified, or it is just '.', then the entire list is returned.
Downloads the BISAC codes from the BISG website and converts them into a hash. Codes and obsolete entries are lowercased and made the keys, the values will be the official names they map to.
Load the BISAC codes from the specified database into the hash. This is called automatically by new().
If the load fails, nothing will happen (silently!), so the only way to tell is to check to see if you have a populated hash afterwards.
Save the BISAC codes in the hash to the database. This will destroy any existing table named bisac_codes.
Croaks on failure.