package DBI::ProfileSubs;
our $VERSION = sprintf("0.%06d", q$Revision: 9395 $ =~ /(\d+)/o);
=head1 NAME
DBI::ProfileSubs - Subroutines for dynamic profile Path
=head1 SYNOPSIS
DBI_PROFILE='&norm_std_n3' prog.pl
This is new and still experimental.
=head1 TO DO
Define come kind of naming convention for the subs.
=cut
use strict;
use warnings;
sub norm_std_n3 {
local $_ = $_;
s/\b\d+\b/<N>/g; s/\b0x[0-9A-Fa-f]+\b/<N>/g;
s/'.*?'/'<S>'/g; s/".*?"/"<S>"/g;
s/([a-z_]+)(\d{3,})\b/${1}<N>/ig;
s!((\s*<[NS]>\s*,\s*){100,})!sprintf("$2,<repeated %d times>",length($1)/2)!eg;
return $_;
}
1;