Biblio::SICI::Util - Utility functions
version 0.04
use Biblio::Sici; use Biblio::SICI::Util qw( titleCode_from_title calculate_check_char ); my $sici = Biblio::Sici->new(); ... if ( my $code = titleCode_from_title($title) ) { $sici->contribution->titleCode($code); }
This module provides some utility functions which are useful when working with SICI.
None of them are exported by default.
titleCode_from_title
Tries to derive the titleCode (cf. the contribution segment) from a string (i.e.: the title of the contribution) passed to it.
titleCode
Since the rules for the construction of the titleCode are quite complex, this method probably won´t generate the correct code if the title contains elements other than regular english words (like mathematical or chemical symbols or characters from a non-ascii alphabet).
If the method is able to generate a code it will be returned. Otherwise the return value is undef.
undef
In order to have a better chance of generating a standard-conformant code the modules Text::Unidecode and Text::Undiacritic are required. If they cannot be found, warnings are emitted but a code might nonetheless be generated. However, if the title is in a language other than english, the probability of generating the correct code sinks even more.
require
calculate_check_char
Calculates and returns the check character. Does not check, if the string param is a valid SICI!
A check character already present in the passed-in SICI will simply be ignored.
Heiko Jansen <hjansen@cpan.org>
This software is copyright (c) 2014 by Heiko Jansen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Biblio::SICI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Biblio::SICI
CPAN shell
perl -MCPAN -e shell install Biblio::SICI
For more information on module installation, please visit the detailed CPAN module installation guide.