GithubHelp home page GithubHelp logo

briandfoy / business-isbn-data Goto Github PK

View Code? Open in Web Editor NEW
3.0 5.0 5.0 1.48 MB

Data pack for Business::ISBN

Home Page: https://metacpan.org/pod/Business::ISBN::Data

License: Other

Perl 100.00%
perl isbn data-pack perl-module

business-isbn-data's Introduction

Coverage Status

The Business::ISBN::Data module

Version 20191107 changed the internal data structure. You need Business::ISBN 3.005 to use this new data structure. Installing the right Business::ISBN with cpan should update this for you. However, installing this module by itself will not update Business::ISBN for you.

This is the README for the Business::ISBN::Data Perl module. You're probably looking at this because you don't know where else to find what you're looking for. Read this once and you might never have to read one again for any Perl module.

Documentation

To read about Business::ISBN::Data, look at the embedded documentation in the module itself. Inside the distribution, you can format it with perldoc:

% perldoc lib/Business/ISBN/Data.pm

If you have already installed the module, you can specify the module name instead of the file location:

% perldoc Business::ISBN::Data

You can read the documentation and inspect the meta data on MetaCPAN.

The standard module documentation has example uses in the SYNOPSIS section, but you can also look in the examples/ directory (if it's there), or look at the test files in t/.

Installation

Usually you don't need to install this module on its own because Business::ISBN will do it for you. You should always try this first:

% cpan Business::ISBN

However, this module might update with the latest data even though Business::ISBN did not change. In that case, you can install this directly:

% cpan Business::ISBN::Data
% cpanm Business::ISBN::Data

You can also install directly from the distribution directory, which will also install the dependencies:

% cpan .
% cpanm .

You could install just this module manually:

% perl Makefile.PL
% make
% make test
% make install

You probably don't want to do that unless you're fiddling with the module and only want to run the tests without installing anything.

Source location

The meta data, such as the source repository and bug tracker, is in Makefile.PL or the META.* files it creates. You can find that on those CPAN web interfaces, but you can also look at files directly in the source repository: https://github.com/briandfoy/business-isbn-data

If you find a problem, file a ticket in the issue tracker.

Starting with v20240716.001, Business::ISBN::Data now uses GitHub Attestations, which allow you to verify that the archive file you have was made from the official repo.

You need a GitHub account and the gh tool.

# download the distro file from GitHub, MetaCPAN, or a CPAN mirror
$ gh auth login
...follow instructions...
$ gh attestation verify Business-ISBN-Data-20240716.001.tar.gz --owner briandfoy

Getting help

Although I'm happy to hear from module users in private email, that's the best way for me to forget to do something.

Besides the issue trackers, you can find help at Perlmonks or Stackoverflow, both of which have many competent Perlers who can answer your question, almost in real time. They might not know the particulars of this module, but they can help you diagnose your problem.

You might like to read brian's Guide to Solving Any Perl Problem.

You should have received a LICENSE file, but the license is also noted in the module files. About the only thing you can't do is pretend that you wrote code that you didn't.

Good luck!

Enjoy,

brian d foy, [email protected]

business-isbn-data's People

Contributors

briandfoy avatar xmorave2 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

business-isbn-data's Issues

Is it time to update the delivered RangeMessage.xml?

The file has grown by 836 lines since the one in the last release. Encountering rejection from some large academic publishers in the Singapore range. While the user can update directly many applications are relying on this in isbn matching. Should we update to the current RangeMessage file so this can start getting into distributions

Business-ISBN-Data-20230426.001: Warning: the following files are missing in your kit

Hello,

Running Strawberry Perl 5.16.3 64 bit, I noticed the following message.

C:\home\pianokey>cpan BDFOY/Business-ISBN-Data-20230426.001.tar.gz

(snip)

Checking if your kit is complete...
Warning: the following files are missing in your kit:
        make_data.pl
Please inform the author.
WARNING: Older versions of ExtUtils::MakeMaker may errantly install README.pod as part of this distribution. It is recommended to avoid using this path in CPAN modules.
Generating a dmake-style Makefile
Writing Makefile for Business::ISBN::Data
Writing MYMETA.yml and MYMETA.json
(C:\Strawberry\perl\bin\perl.exe Makefile.PL exited with 0)

(snip)

Thank you,

normalization of ISBN 9783863267667

Perling the code

#!/usr/bin/perl -l
use Business::ISBN;
print Business::ISBN->new('9783863267667')->as_string;

spits out 978-3-86326-766-7. At the same time, the publisher typesets the ISBN of “Moderne Betriebssysteme” differently: 978-3-8632-6766-7. I asked the publisher around 2021-07-21 and the International ISBN agency on 2021-07-26. Pearson has not answered so far, and the International ISBN agency said it would inform the German one. Which of the two spellings with hyphens is correct™?
Crosspost: briandfoy/business-isbn#14 .

Failed test 'No tests run for subtest "check_isbns"'

The test suite fails on some of my smokers:

...
t/check_data_structure.t .. ok
    # No tests run!

#   Failed test 'No tests run for subtest "check_isbns"'
#   at t/default_data.t line 40.
# Looks like you failed 1 test of 4.
t/default_data.t .......... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests 
    # Business::ISBN::Data 20210112.004
t/load.t .................. ok
...

This seems to happen if a version of Business::Data is already installed and thus the t/default_data.t test is not skipped.
Maybe related: the variable @isbns_from_issues in https://metacpan.org/source/BDFOY/Business-ISBN-Data-20210112.004/t%2Fdefault_data.t#L8 is nowhere used, instead in the check_isbns subtest there's a loop over $_[0] which isn't defined.

XMLRange message not automatically archived by PAR

Business::ISBN::Data doesn't work out of the box with PAR. This is not surprising.
The error message is not helpful.

Could not open  to get ISBN range data [No such file or directory]
 at Business/ISBN.pm line 87.

The solution has 2 steps.

  • Add the following to your pp invocation.
-a 'YOUR PATH/lib/perl5/Business/ISBN/RangeMessage.xml;lib/Business/ISBN/RangeMessage.xml'
  • Add the following before Business::ISBN is invoked.
BEGIN {
    if( $ENV{PAR_TEMP} ) {
        $ENV{ISBN_RANGE_MESSAGE} = File::Spec->catfile( $ENV{PAR_TEMP}, qw( inc lib Business ISBN RangeMessage.xml ) );
    }
}

This could be added to the doco. Or just let google find this issue to help future generations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.