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 πŸŽ€

Lowkey reminder: doi and usr have 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