hardcoded path information for example /var/www/mvhub

Registered by Mansi

Problems we are solving:

  Information is duplicated in apache.conf , test scripts, application conf, env_vars.sh change requires modification of several files.

    ugly to hard code (emotionally very traumatic to read)

   we will need to change paths to package software, easier if not hard coded

   other people will want to install in places other than our
   hard coded choices

In many places in the code there is hard coded path information for example '/var/www/mvhub'

All this information should be in a single config file and the various scripts and libraries should read this info from the config file

Some scripts should be generated from conf file.

For example lib-mvhub/lib/MVHub/CGIAppBase.pm should maybe setup $BASE_DIR for project root and $SOURCE_DIR $BASE_DIR/link-to-live/code

Some paths are or should be calculated.

  For example cgi-bin is $BASE_DIR/$WEB_DOCUMENT_ROOT/cgi-bin/

Eric A says sprintf or interpolation is better/less dangerous than eval for this.

Possible Steps to project:
  0) write tests:
     look for /var/www maybe?
    look for /.*/.*/ maybe?

   1) find and list all hard coded path info

  2) make a chart (spreadsheet ??) with current hardcoded info
       | ideal variable names

 3) list code to be written, probably
   lib-mvhub/lib/MVHub/Conf.pm
    mv_generate_conf
   modify: lib-mvhub/lib/MVhub/CGIAppBase.pm

4) modify all code to remove hard coded paths

5) remove conf files now generated from version control

6) Add test to be sure generated conf is older than master conf file

Blueprint information

Status:
Complete
Approver:
Dan MacNeil
Priority:
Medium
Drafter:
Dan MacNeil
Direction:
Needs approval
Assignee:
Mansi
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
milestone icon 2009-08
Completed by
Dan MacNeil

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.