It seems that if you set prefix_pattern or prefix to '-' then setting long_prefix_pattern to '--' doesn't recognize the --long_opt. You can add debug as a config option to get an idea of what it's doing. In Getopt/Long.pm in the FindOption function it first checks if the option starts with '-' if prefix is '-' and it splits the option into
and the rest of the option into $opt. After this it checks
which doesn't match if $longprefix is '--'. That is the only place in the module that evaluates $longprefix so it seems like a bug to me.