in reply to HTML::Entities - export/modify %char2entity ?
As for your actual objective:
use HTML::Entities qw( decode_entities ); sub my_decode_entities { local $HTML::Entities::entity2char{egrave} = chr(232); return decode_entities(@_); }
Another way:
use HTML::Entities qw( _decode_entities ); { my %entity2char = ( %HTML::Entities::entity2char, egrave => chr(232), ); sub my_decode_entities { return map { _decode_entities($_, \%entity2char } @_; } }
In both cases, you don't break anything (such as HTML generating functions) by modifying the hashes since the scope of the modifications has been limited.
By the way, I wouldn't call it a "default" list. It should be comprehensive. If any HTML entities are not included, you should submit a bug report.
|
|---|