I'm fairly sure that I'm missing something obvious and will kick myself when someone points out what it is, but I'm stuck. I am storing some configuration info in a database and trying to use it to generate a portion of my TAG_info. Because I want to reuse the code, I've moved it to a module. However, when the method returns the string containing the call to TAG_info, and I try to eval it, the field does not appear on the instantiation page. I've spent a couple of hours on this, trying to simplify it down to a couple of test cases that illustrate exactly where the problem is occuring, without the complexity of calling the method in the module.
This works:
eval {
TAG_info(
"earl" => "<input type='text' value='test'>"
);
};
This does
not:
$tagInfo = qq|
TAG_info(
"earl" => "<input type='text' value='test'>"
);|;
eval {
$tagInfo
};
So then I thought that perhaps the eval was being run prior to $tagInfo coming into scope (grasping at straws), but this works:
$bubba = "This is a test";
eval {
TAG_info(
"earl" => "<input type='text' value='$bubba'>"
);
};
So, I'm stumped at the moment.