NAME
NKC::Transform::BIBFRAME2MARC::Utils - Utilities for bibframe2marc transformations.
SYNOPSIS
use NKC::Transform::BIBFRAME2MARC::Utils qw(list_versions);
my @versions = list_versions($dir);
SUBROUTINES
list_versions
my @versions = list_versions($dir);
Get list of installed versions of bibframe2marc transformations.
$dir is optional. Default value of $dir variables is installation directory.
Returns list.
ERRORS
list_versions():
Cannot open directory.
EXAMPLE
use strict;
use warnings;
use File::Temp qw(tempdir);
use File::Spec::Functions qw(catfile);
use IO::Barf qw(barf);
use NKC::Transform::BIBFRAME2MARC::Utils qw(list_versions);
# Temporary directory.
my $temp_dir = tempdir(CLEANUP => 1);
# Create test files.
barf(catfile($temp_dir, 'bibframe2marc-2.5.0.xsl'), '');
barf(catfile($temp_dir, 'bibframe2marc-2.6.0.xsl'), '');
barf(catfile($temp_dir, 'bibframe2marc-3.6.0.xsl'), '');
# List versions.
my @versions = list_versions($temp_dir);
# Print versions.
print join "\n", @versions;
print "\n";
# Output:
# 2.5.0
# 2.6.0
# 3.6.0
DEPENDENCIES
Error::Pure Exporter File::Spec::Functions, File::Share, Readonly.
SEE ALSO
- NKC::Transform::BIBFRAME2MARC
-
bibframe2marc transformation class.
REPOSITORY
https://github.com/michal-josef-spacek/NKC-Transform-BIBFRAME2MARC
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2024-2026 Michal Josef Špaček
BSD 2-Clause License
ACKNOWLEDGEMENTS
Development of this software has been made possible by institutional support for the long-term strategic development of the National Library of the Czech Republic as a research organization provided by the Ministry of Culture of the Czech Republic (DKRVO 2024–2028), Area 11: Linked Open Data.
VERSION
0.04