Skip Menu |

This queue is for tickets about the Inline-Files CPAN distribution.

Report information
The Basics
Id: 90262
Status: stalled
Priority: 0/
Queue: Inline-Files

People
Owner: Nobody in particular
Requestors: DAshirov [...] mindspark.com
Cc:
AdminCc:

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



Subject: I::F - fileno support? C:IF - I::F support ?
Date: Mon, 11 Nov 2013 15:02:53 +0000
To: "bug-Config-IniFiles [...] rt.cpan.org" <bug-Config-IniFiles [...] rt.cpan.org>, "bug-Inline-Files [...] rt.cpan.org" <bug-Inline-Files [...] rt.cpan.org>
From: David Ashirov <DAshirov [...] mindspark.com>
Hello Alberto and Shlomi, Below is not necessarily a bug, more of a missing feature. I'm not sure which module (Config::IniFiles or Inline::Files) is best to add support for one another. I do however want to start a discussion. Whenever I tried to make the two ingenious modules to work together, I failed. 1. Config::IniFiles complains that Inline::Files has not implemented &fileno and bails out when passed a GLOB or a ref to a GLOB returned by Inline::Files. Use Config::IniFiles; Use Inline::Files; open CONFIG,shift(@main::CONFIG); new Config::IniFiles(-file=>*CONFIG,-reloadwarn=>1) __INLINE__ Something 1 __INLINE__ Something 2 __END__ [my config] A=b B=c Bizarre copy of HASH in list assignment at /apps/perlbrew/perls/perl-5.18.1/lib/5.18.1/Carp.pm line 165. 2. Inline::Files also messes with *main::DATA, so Config::IniFiles cant load the inline configuration using standard methodology - it complains of "Bizarre copy of HASH in list assignment" Use Config::IniFiles; Use Inline::Files; new Config::IniFiles(-file=>*DATA,-reloadwarn=>1) __INLINE__ Something 1 __INLINE__ Something 2 __END__ [my config] A=b B=c Inline::Files::Virtual::FILENO not yet implemented at /apps/perlbrew/libs/perl-5.18.1@feeds/lib/perl5/Config/IniFiles.pm line 2766. I would love to have the two modules work together as the possibilities are just too good to ignore ( Inline::Files supports read/write access too !) Thanks for your time, David Ashirov.
Dear David, Almost three years later, I am finding this ticket (no idea why I missed it in my mailbox). I inherited Inline::Files from Damian Conway, and I confess I lack the knowledge to implement new features. If you want to only *read* the inifile, you might be able to read the inline file to a scalar, and send the scalar ref to C::IF. But probably this ticket is no longer relevant... Best, Alberto On Mon Nov 11 10:03:08 2013, DAshirov@mindspark.com wrote: Show quoted text
> Hello Alberto and Shlomi, > > Below is not necessarily a bug, more of a missing feature. I'm not > sure which module (Config::IniFiles or Inline::Files) is best to add > support for one another. I do however want to start a discussion. > Whenever I tried to make the two ingenious modules to work together, I > failed. > > > 1. Config::IniFiles complains that Inline::Files has not > implemented &fileno and bails out when passed a GLOB or a ref to a > GLOB returned by Inline::Files. > > > > Use Config::IniFiles; > > Use Inline::Files; > > open CONFIG,shift(@main::CONFIG); > > new Config::IniFiles(-file=>*CONFIG,-reloadwarn=>1) > > __INLINE__ > > Something 1 > > __INLINE__ > > Something 2 > > __END__ > > [my config] > > A=b > > B=c > > > > Bizarre copy of HASH in list assignment at /apps/perlbrew/perls/perl- > 5.18.1/lib/5.18.1/Carp.pm line 165. > > > > 2. Inline::Files also messes with *main::DATA, so > Config::IniFiles cant load the inline configuration using standard > methodology - it complains of "Bizarre copy of HASH in list > assignment" > > > > Use Config::IniFiles; > > Use Inline::Files; > > new Config::IniFiles(-file=>*DATA,-reloadwarn=>1) > > __INLINE__ > > Something 1 > > __INLINE__ > > Something 2 > > __END__ > > [my config] > > A=b > > B=c > > > > Inline::Files::Virtual::FILENO not yet implemented at > /apps/perlbrew/libs/perl-5.18.1@feeds/lib/perl5/Config/IniFiles.pm > line 2766. > > > > I would love to have the two modules work together as the > possibilities are just too good to ignore ( Inline::Files supports > read/write access too !) > > Thanks for your time, > > David Ashirov.