Wrap DBI to for simpler new() , filtering of output , simpler queries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MVHub |
In Progress
|
Medium
|
Steven LeBoeuf |
Bug Description
GOALS:
We want to sub class the standard build in DBI library to:
1) simplify constructor
2) simplify fetchall_ syntax
3) create ouput filtered through HTML::Entities
#3 is important because we accept chars like & or accent grave
that aren't valid html and then spit them out
DOCS
existing similar source code:
more lib-mvhub/
man perltoot
man perlobj
CODE TO ADD:
lib-
with methods:
sub new() # to contain the functionality of:
and replacements for:
...these replacements
1) includes functionality of:
MVHub:
2) simplify parameter list to foo('QUERY_
3) run the output from the database through:
HTML:
MODIFY CODE:
1) lib-mvhub/
a. probably all of CGIAppBase:
can be removed
2) most places that call
Note: it may be easier/better to replace selectrow_array with
selectall_arrayref than to write a replacement selectrow_array
3) most places that call
my $dbh = MVHub::
replaced with:
my $dbh = MVHub::
DELETE CODE:
# probably
MVHub:
USEFUL GREPS
These commands will find places where calling code almost certainly must
be modified:
cdw
export $REGEX=
egrep $REGEX . -rl
to filter out false positives:
export SKIP_REGEX=
egrep $REGEX . -rl | egrep -v $SKIP_REGEX
Changed in mvhub: | |
status: | Confirmed → In Progress |