DOKK / manpages / debian 12 / libbiblio-sici-perl / Biblio::SICI::Util.3pm.en
Biblio::SICI::Util(3pm) User Contributed Perl Documentation Biblio::SICI::Util(3pm)

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.

Tries to derive the "titleCode" (cf. the contribution segment) from a string (i.e.: the title of the contribution) passed to it.

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".

In order to have a better chance of generating a standard-conformant code the modules Text::Unidecode and Text::Undiacritic are "require"d. 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.

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.

2023-02-06 perl v5.36.0