Skip Menu |

This queue is for tickets about the Config-General CPAN distribution.

Report information
The Basics
Id: 43960
Status: resolved
Priority: 0/
Queue: Config-General

People
Owner: tlinden [...] cpan.org
Requestors: Maurice.Height [...] great-southern.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Here doc documentation error
Date: Mon, 9 Mar 2009 16:42:27 +0900
To: "bug-Config-General [...] rt.cpan.org" <bug-Config-General [...] rt.cpan.org>
From: Maurice Height <Maurice.Height [...] great-southern.com.au>
I am using Config::General v2.42 on Windows XP/Strawberry Perl v5.10 (last release) Examples in the module's documentation for using here documents, like the following, do not show an '=' char before <<EOF, yet the module will not return the here doc contents properly unless I add the '=' char. message <<EOF we want to remove the homedir of root. EOF My code is: my %config_opt = ( -ConfigFile => $config_file, -SplitPolicy => 'equalsign', -CComments => 0, -BackslashEscape => 1); my $CG_obj = Config::General->new(%config_opt); my %config = $CG_obj->getall; This works correctly: message =<<EOF we want to remove the homedir of root. EOF Thanks for a great module which I always use for configuration files. Regards Maurice Height Application Support Officer Great Southern Limited P.O. Box 5363, Albany WA 6332 84 Collie Street, Albany WA 6330 Maurice.Height@gsp.com.au P. 08 9892 9877 This email and any attachments are confidential and may be legally privileged. If you are not the intended recipient you must not use, reproduce, disclose or distribute the information contained in this email. If you have received this email in error please notify us immediately by return email or contact Great Southern Limited on 1800 258 348, and promptly delete the email and any attachments. All emails are also automatically filtered and may be examined at the discretion of management, without prior notification to the sender or recipient. Great Southern Limited ACN 052 046 536 and its related entities accept no liability for any damage caused by this email or its attachments due to unauthorised use, computer viruses or other conditions which may damage or interfere with data, hardware or software with which it might be used.
I don't agree. If you'd take a look to the 8th test in t/run.t, which uses the configfile in t/cfg.8 then you'll see that no '=' separator is being used but the test passes anyway. This is the intended behavior if no custom separator have been configured. In your case there is a configured custom separator therefore you'll have to use the same custom separator for here-docs. So, the documentation is based on the default, which is not to use a separator at all, therefore it doesn't include x examples how it would look if one uses a custom separator.