NAME

DBIO::Oracle::Identifier - Shorten Oracle identifiers to the 30-character limit

VERSION

version 0.900000

DESCRIPTION

Oracle (pre-12.2) limits identifiers to 30 bytes. Both the SQL-generation side (DBIO::Oracle::SQLMaker, at query time) and the deploy side (DBIO::Oracle::DDL, when emitting generated sequence and index names) need to fit names into that limit using the same algorithm, so a name generated at deploy time matches the name referenced at query time.

This module owns that single algorithm. Names already within the limit are returned unchanged; longer names are CamelCase-compressed (vowels trimmed if needed) and suffixed with a base36-encoded MD5 hash so the result is stable and collision-resistant.

my $name = DBIO::Oracle::Identifier::shorten($identifier);
my $name = DBIO::Oracle::Identifier::shorten($identifier, \@keywords);

Returns $identifier unchanged when it is 30 characters or fewer. Otherwise returns a deterministic shortened form. The optional \@keywords arrayref controls the human-readable prefix (defaults to the identifier itself).

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 103:

Unknown directive: =func