<<

Barcodes

Note that the object returned by new is actually of the type requested (or set by syspref). For example, C4::Barcodes::annual

The specific C4::Barcodes::* modules correspond to the autoBarcode syspref values.

The default behavior here in Barcodes should be essentially a more flexible version of "incremental".

Adding New Barcode Types

To add a new barcode format, a developer should:

    create a module in C4/Barcodes/, like C4/Barcodes/my_new_format.pm;
    add to the $types hashref in this file;
    add tests under the "t" directory; and
    edit autoBarcode syspref to include new type.

Adding a new module

Each new module that needs differing behavior must override these subs:

    new_object
    initial
    db_max
    parse

Or else the CLASS subs will be used.

$types hashref

The hash referenced can be thought of as the constructor farm for all the C4::Barcodes types. Each value should be a reference to a sub that calls the module constructor.

Notes

You would think it might be easy to handle incremental barcodes, but in practice even commonly used values, like the IBM "Boulder" format can cause problems for sprintf. Basically, the value is too large for the %d version of an integer, and we cannot count on perl having been compiled with support for quads (64-bit integers). So we have to use floats or increment a piece of it and return the rejoined fragments.

Functions

initial

Missing POD for initial.

width

Missing POD for width.

process_head

Missing POD for process_head.

process_tail

Missing POD for process_tail.

is_max

Missing POD for is_max.

value

Missing POD for value.

autoBarcode

Missing POD for autoBarcode.

parse

Missing POD for parse.

max

Missing POD for max.

db_max

Missing POD for db_max.

next_value

Missing POD for next_value.

next

Missing POD for next.

previous

Missing POD for previous.

serial

Missing POD for serial.

default_self

Missing POD for default_self.

new_object

Missing POD for new_object.

<<