http://qs1969.pair.com?node_id=1078489


in reply to Re^2: What's the best way to use Any YAML (not YAML::Any)
in thread What's the best way to use Any YAML (not YAML::Any)

"Checking for Dump/Load is prudent, but all of the listed YAML modules implement the common Dump/Load API, so I don't think it's absolutely necessary."

Can you guarantee that you'll only ever use "the listed YAML modules"? Can you guarantee that you'll never want to use another function beyond Dump and Load in this, or a subclassed, module?

Yes, it's prudent. No, it's not absolutely necessary. It's two lines of code that you can choose to add to your module or not.

"The check for Dump/Load in your last version assumes the included module uses @EXPORT."

No, that check occurred in the original version, not the update. The original solution was hidden in a spoiler (for anyone interested in seeing the changes that were made). I thought that "original solution (see spoiler below)" made this clear but apparently not: I've added additional text making this clearer.

-- Ken