Bug 467240
| Summary: | No error reporting when config is a directory | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Petr Šplíchal <psplicha> | |
| Component: | perl-Config-General | Assignee: | perl-maint-list | |
| Status: | CLOSED NEXTRELEASE | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 5.3 | CC: | ohudlick, ovasik, ppisar, rvokal | |
| Target Milestone: | rc | Keywords: | Rebase | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Rebase: Bug Fixes and Enhancements | ||
| Doc Text: |
The Config::General module has been upgraded to upstream version 2.50, which provides a large number of bug fixes and enhancements over the previous version, 2.40. This upgrade incorporates a lot of changes since the 2.40 release of the module, but the API remains compatible.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 658945 658946 (view as bug list) | Environment: | ||
| Last Closed: | 2013-03-06 12:17:18 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
This was fixed by upstream in version 2.44. Where did get this package? It's not in part of RHEL-5.5. Which repository do you use? Should be available in the RHEL Cluster-Storage (v. 5 server) repo. Minimal test case:
use Config::General;
Config::General->new(".")->getall;
In contrast to comment #1, I think this bug has not been fixed in upstream 2.44 version and it presents in current upstream 2.49 version. A bug has been reported to upstream.
Fixed in upstream version 2.50 version. Changelog:
2.50
- fixed rt.cpan.org#63487 documentation error.
- fixed rt.cpan.org#61302, now croak if the config file
parameter is a directory and directory include is not
turned on.
- fixed rt.cpan.org#60429 META.yml typo
- added new option -AllowSingleQuoteInterpolation, which
turns on interpolation for variables inside single quotes.
- added test case for the new option
Test:
$ perl -I /tmp/Config-General-2.50/blib/lib/ -MConfig::General -e 'Config::General->new(".")->getall'
Config::General: config file argument is a directory, expecting a file!
at -e line 1
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
New version 2.50 accumulates a lot of fixes gathered since version 2.40 (in three years). API remains compatible.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Diffed Contents:
@@ -1 +1 @@
-New version 2.50 accumulates a lot of fixes gathered since version 2.40 (in three years). API remains compatible.+The Config::General module has been upgraded to upstream version 2.50, which provides a large number of bug fixes and enhancements over the previous version, 2.40. This upgrade incorporates a lot of changes since the 2.40 release of the module, but the API remains compatible.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. I am sorry, but it is too late in the RHEL-5 release cycle. At the moment we are addressing only critical and security related issues in RHEL-5. This one is not reproducible in RHEL-6. I am closing the bug as NEXTRELEASE. |
Description of problem: When Config::General is supplied a directory instead of a config file it silently accepts it and returns an empty config hash. Version-Release number of selected component (if applicable): perl-Config-General-2.40-1.el5.noarch Steps to Reproduce: use Data::Dumper; use Config::General; my $configurator = new Config::General("/etc/httpd/conf.d/"); %config = $configurator->getall; print Dumper(\%config); Actual results: $VAR1 = {}; Expected results: It should croak something like: Config::General: Cannot open "/etc/httpd/conf.d/" par parsing, it's a directory. [and return non-zero exit status] Additional info: Croaks well with non-existing files: Config::General The file "/etc/httpd/conf.dd/" does not exist within ConfigPath: /etc/httpd/conf.dd! at test.pl line 6