oalders / http-browserdetect

Determine the Web browser, version, and platform from an HTTP user agent string
http://www.browserdetect.org
Other
58 stars 47 forks source link

Simplify builds by removing Hash::Merge #204

Closed petdance closed 1 year ago

petdance commented 1 year ago

Hash::Merge is used in only one place, in t/01-detect.t. It's used to combine two hashrefs:

my $all_tests = merge( $tests, $more_tests );

However, there is no overlap between $tests and $more_tests, so Hash::Merge isn't necessary, and could just be:

my $all_tests = { %$tests, %$more_tests };

This was prompted by HTTP::BrowserDetect not installing for me in a Docker container build. Hash::Merge fails to install. I know that the failure of Hash::Merge isn't HTTP::BrowserDetect's problem, but I figure simplifying its module usage could be a good thing.

petdance commented 1 year ago

Nice, thank you.

oalders commented 1 year ago

Should be on CPAN shortly.