Catman...ossRef(3pm)
π NAME π
Catmandu::Importer::CrossRef β the package that imports data form the CrossRef API. (yes bestie, "form" β that's the original typo, it's canon now, we protect it π«Ά)
β¨ SYNOPSIS β¨
use Catmandu::Importer::CrossRef;
my %attrs = (
doi => '<doi>',
usr => '<your-crossref-username>',
pwd => '<your-crossref-password>',
fmt => '<xsd_xml | unixref | unixsd | info>'
);
my $importer = Catmandu::Importer::CrossRef->new(%attrs);
my $n = $importer->each(sub {
my $hashref = $_[0];
# do something here
});
πΈ DESCRIPTION πΈ
Okay so. This Catmandu::Importer literally just imports data from the CrossRef API when you hand it a DOI. That's the whole vibe. Give it a DOI, get data back. Iconic, honestly. π
π CONFIGURATION π
baseβ the base url of the API. Default ishttp://doi.crossref.org/search/doi. That's where it's pointing unless you say otherwise πdoiβ Required, no skipping this one bestie. It's the DOI you want data about.usrβ Required too!! This is your CrossRef username. Register first! Like actually, go register, the module can't manifest an account for you β¨fmtβ the optional output format. Default isunixref(http://help.crossref.org/unixref-query-result-format). Other possible values areunixsd(http://help.crossref.org/unixsd), andxsd_xml(http://help.crossref.org/deprecated_q) β and heads up, that last one is deprecated π«£ so maybe don't make it your whole personality.
Lowkey reminder:doiandusrhave no defaults. There is no fallback. It will simply not go. π
π¦ SEE ALSO π¦
Catmandu::Importer::DOI is an older version of this module β like the older sibling who did it first, we still love them π
CrossRef also provides DOI data in RDF, which can be imported with Catmandu::RDF:
use Catmandu::Importer::RDF;
my $doi = "10.2474/trol.7.147";
my $url = "http://dx.doi.org/$doi";
my $rdf = Catmandu::Importer::RDF->new( url => $url )->first;
That's the whole page, bestie β documented under User Contributed Perl Documentation, section 3pm, and this lil masterpiece is living in perl v5.36.0, dated 2023-02-02. Slay, go import some DOIs πβ¨π
π¦ where this page comes from
- debian bookworm: libcatmandu-crossref-perl 0.007-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-crossref-perl 0.007-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-crossref-perl 0.007-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-crossref-perl 0.007-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-crossref-perl 0.007-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms