fixing drupal info files on php 5.3

http://www.justsaypictures.com/images/189-800-600-cutest-kitten-in-the-world.jpg

Trying some Drupal 5 sites for upgrade script development on desktop PHP 5.3 I ran on *.info files causing annoyances.

function fix_d5_info {
  # description containing the word : 'on'
  # php message: syntax error, unexpected BOOL_FALSE in
  local INFOS=`find ${ROOT_DIR} -type f -name "*.info" -exec grep -l "description.* on " {} \;`
  perl -e "s/description = /description = "/g;" -pi $INFOS
  perl -e "s/description = .*/$&"/g;" -pi $INFOS

  # description containing the word : 'is'
  # php message: syntax error, unexpected BOOL_FALSE in
  local INFOS=`find ${ROOT_DIR} -type f -name "*.info" -exec grep -l "description.* is " {} \;`
  perl -e "s/description = /description = "/g;" -pi $INFOS
  perl -e "s/description = .*/$&"/g;" -pi $INFOS

  # php message: Comments starting with '#' are deprecated
  local INFOS=`find ${ROOT_DIR} -type f -name "*.info" -exec grep -l "^#" {} \;`
  perl -e "s/^#/;/g;" -pi $INFOS
}