logo       

Re: Re: RFC: IOC Configuration syntax/mini-language: msg#00035

Subject: Re: Re: RFC: IOC Configuration syntax/mini-language
Rob,

On Dec 29, 2004, at 1:07 PM, Rob Kinyon wrote:
I think I am going to look at Config::ApacheFormat and see if I can't
hack in multi-line support. That will answer my questions in the end
anyway.

You're going to want to look at doing something like heredocs. Maybe,
it would look something like:

<Foo foo1>
    Directive
multiline
text
here
EndDirective

    SomeOtherDirective With Some Values
</Foo>

Actually I was thinking they would work best as <blocks> and not directives. This would allow for more free-form text inside the block and not force the introduction of an 'End<directive name>' token.

This means you'll want to look at the while-loop labelled LINE:,
especially the do-while loop with the comment "# accumulate a full
line, dealing with line-continuation". Adding a new directive called
"multi_line" would probably be best, along the same lines as
hash_directives or duplicate_directives, where you specify which
directives have this multi_line property set for them. That way,
people who don't want it don't get it, it's backwards-compatible, and
it's self-documenting as to which directives break the Apache standard
expectations.

I already have something hacked together and working with <blocks> right now, and I have introduced a 'valid_multi_line_blocks' option to turn it on for specific blocks only. And this:

<Registry MyApp>
    <Container DBI>
        dsn      dbi:mysql:test
        username test
        password ****
        <Service connect>
            my $c = shift;
DBI->connect($c->get('dsn'), $c->get('username'), $c->get('password'));
        </Service>
    </Container>
</Registry>

is parsing succusfully.

I am actually going to email Sam to see if he is interested in it before I start cleaning up the code.

Steve


Rob


Steve

Rob


On Wed, 29 Dec 2004 10:36:08 -0500, Stevan Little
<stevan@xxxxxxxxxxxxxxxx> wrote:

On Dec 28, 2004, at 8:47 PM, Terrence Brannon wrote:
I think so. But why not name your subrefs and put them in a module
and
refer to them in a single clean line of config code?

Hmmmm, Thats a good thought.

Steve


_______________________________________________
sw-design mailing list
sw-design@xxxxxxxxxxxx
http://metaperl.com/cgi-bin/mailman/listinfo/sw-design


_______________________________________________
sw-design mailing list
sw-design@xxxxxxxxxxxx
http://metaperl.com/cgi-bin/mailman/listinfo/sw-design



_______________________________________________
sw-design mailing list
sw-design@xxxxxxxxxxxx
http://metaperl.com/cgi-bin/mailman/listinfo/sw-design


_______________________________________________
sw-design mailing list
sw-design@xxxxxxxxxxxx
http://metaperl.com/cgi-bin/mailman/listinfo/sw-design



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe