Balanced Text??

Discussion in 'Perl Misc' started by MPBroida, Oct 23, 2003.

  1. MPBroida

    MPBroida Guest

    Hi!
    I've seen this mentioned here before, but I can't find
    the specific messages. It's not directly in the FAQ,
    either, though it's a "standard" response to questions
    about nested parens/etc when asked in this newsgroup.

    But I don't recall whether the package/module is:
    Text::Balanced
    or:
    Balanced::Text

    Neither is installed here, so I need the CORRECT name
    so I can request that it be acquired and installed.

    Thanks!
    Mike
     
    MPBroida, Oct 23, 2003
    #1
    1. Advertising

  2. In article <3F983FDE.C47CEF95@boeing_oops.com>, MPBroida wrote:
    [cut]
    > But I don't recall whether the package/module is:
    > Text::Balanced
    > or:
    > Balanced::Text


    Use search.cpan.org and search for "Balanced".

    --
    Andreas Kähäri
     
    Andreas Kahari, Oct 23, 2003
    #2
    1. Advertising

  3. Hi!

    Is this what you're looking for?

    http://www.perldoc.com/perl5.8.0/lib/Text/Balanced.html

    Good luck


    "MPBroida" <michael.p.broida@boeing_oops.com> wrote in message
    news:3F983FDE.C47CEF95@boeing_oops.com...
    > Hi!
    > I've seen this mentioned here before, but I can't find
    > the specific messages. It's not directly in the FAQ,
    > either, though it's a "standard" response to questions
    > about nested parens/etc when asked in this newsgroup.
    >
    > But I don't recall whether the package/module is:
    > Text::Balanced
    > or:
    > Balanced::Text
     
    Experienced but Undocumented, Oct 23, 2003
    #3
  4. MPBroida

    MPBroida Guest

    MPBroida wrote:
    >
    > Hi!
    > I've seen this mentioned here before, but I can't find
    > the specific messages. It's not directly in the FAQ,
    > either, though it's a "standard" response to questions
    > about nested parens/etc when asked in this newsgroup.
    >
    > But I don't recall whether the package/module is:
    > Text::Balanced
    > or:
    > Balanced::Text
    >
    > Neither is installed here, so I need the CORRECT name
    > so I can request that it be acquired and installed.
    >
    > Thanks!
    > Mike


    Thanks, all, for the responses!
    Mike
     
    MPBroida, Oct 23, 2003
    #4
  5. MPBroida <michael.p.broida@boeing_oops.com> wrote:

    > I've seen this mentioned here before, but I can't find
    > the specific messages. It's not directly in the FAQ,
    > either,



    Yes it is.


    > But I don't recall whether the package/module is:
    > Text::Balanced
    > or:
    > Balanced::Text



    perldoc -q Balanced

    Can I use Perl regular expressions to match balanced text?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Oct 24, 2003
    #5
  6. MPBroida

    MPBroida Guest

    Tad McClellan wrote:
    >
    > MPBroida <michael.p.broida@boeing_oops.com> wrote:
    >
    > > I've seen this mentioned here before, but I can't find
    > > the specific messages. It's not directly in the FAQ,
    > > either,

    >
    > Yes it is.


    Don't see it anywhere.


    > > But I don't recall whether the package/module is:
    > > Text::Balanced
    > > or:
    > > Balanced::Text

    >
    > perldoc -q Balanced
    >
    > Can I use Perl regular expressions to match balanced text?


    But that perldoc section does NOT refer to either
    "Balanced::Text" or "Text::Balanced", and that's
    what I was hunting for: the real name of that module/
    package/whatever it is.

    Mike
     
    MPBroida, Oct 24, 2003
    #6
  7. MPBroida <michael.p.broida@boeing_oops.com> wrote:
    > Tad McClellan wrote:
    >>
    >> MPBroida <michael.p.broida@boeing_oops.com> wrote:
    >>
    >> > I've seen this mentioned here before, but I can't find
    >> > the specific messages. It's not directly in the FAQ,
    >> > either,

    >>
    >> Yes it is.

    >
    > Don't see it anywhere.
    >
    >
    >> > But I don't recall whether the package/module is:
    >> > Text::Balanced
    >> > or:
    >> > Balanced::Text

    >>
    >> perldoc -q Balanced
    >>
    >> Can I use Perl regular expressions to match balanced text?

    >
    > But that perldoc section does NOT refer to either
    > "Balanced::Text" or "Text::Balanced", and that's
    > what I was hunting for: the real name of that module/
    > package/whatever it is.



    Huh?

    Can I use Perl regular expressions to match balanced text?

    Historically, Perl regular expressions were not
    capable of matching balanced text. As of more
    recent versions of perl including 5.6.1 experimen­
    tal features have been added that make it possible
    to do this. Look at the documentation for the
    (??{ }) construct in recent perlre manual pages to
    see an example of matching balanced parentheses.
    Be sure to take special notice of the warnings
    present in the manual before making use of this
    feature.

    CPAN contains many modules that can be useful for
    matching text depending on the context. Damian
    Conway provides some useful patterns in Reg­
    exp::Common. The module Text::Balanced provides a
    ^^^^^^^^^^^^^^
    general solution to this problem.



    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Oct 24, 2003
    #7
  8. MPBroida

    MPBroida Guest

    Tad McClellan wrote:
    >
    > MPBroida <michael.p.broida@boeing_oops.com> wrote:
    > > Tad McClellan wrote:
    > >>
    > >> > But I don't recall whether the package/module is:
    > >> > Text::Balanced
    > >> > or:
    > >> > Balanced::Text
    > >>
    > >> perldoc -q Balanced
    > >>
    > >> Can I use Perl regular expressions to match balanced text?

    > >
    > > But that perldoc section does NOT refer to either
    > > "Balanced::Text" or "Text::Balanced", and that's
    > > what I was hunting for: the real name of that module/
    > > package/whatever it is.

    >
    > Huh?
    >
    > Can I use Perl regular expressions to match balanced text?
    >
    > Historically, Perl regular expressions were not
    > capable of matching balanced text. As of more
    > recent versions of perl including 5.6.1 experimen­
    > tal features have been added that make it possible
    > to do this. Look at the documentation for the
    > (??{ }) construct in recent perlre manual pages to
    > see an example of matching balanced parentheses.
    > Be sure to take special notice of the warnings
    > present in the manual before making use of this
    > feature.
    >
    > CPAN contains many modules that can be useful for
    > matching text depending on the context. Damian
    > Conway provides some useful patterns in Reg­
    > exp::Common. The module Text::Balanced provides a
    > ^^^^^^^^^^^^^^
    > general solution to this problem.


    Hmm, must be a different Perl version. I get quite a bit
    less info, and NO mention of the specific Text::Balanced
    package.

    I'm using 5.6.0, "binary build 616 provided by ActiveState <etc>".
    I've noticed that the perldoc contents are a bit newer and more
    complete than the 2nd Edition Camel book, but it's probably a
    bit less complete than the version you're using. Unfortunately,
    there's little chance of updating the version here: too many
    tools depend on it working EXACTLY as it does now. "Someday"
    we'll update.

    Thanks for the updated info. :)

    Mike
     
    MPBroida, Oct 27, 2003
    #8
  9. MPBroida (michael.p.broida@boeing_oops.com) wrote:

    : > exp::Common. The module Text::Balanced provides a
    : > ^^^^^^^^^^^^^^
    : > general solution to this problem.

    : Unfortunately,
    : there's little chance of updating the version here: too many
    : tools depend on it working EXACTLY as it does now. "Someday"
    : we'll update.

    : Thanks for the updated info. :)


    Text::Balanced says it requires perl 5.005

    (Which is much less than 5.6.anything)

    so I don't understand why you don't just install the module and use it.
     
    Malcolm Dew-Jones, Oct 27, 2003
    #9
  10. MPBroida

    MPBroida Guest

    Malcolm Dew-Jones wrote:
    >
    > MPBroida (michael.p.broida@boeing_oops.com) wrote:
    >
    > : > exp::Common. The module Text::Balanced provides a
    > : > ^^^^^^^^^^^^^^
    > : > general solution to this problem.
    >
    > : Unfortunately,
    > : there's little chance of updating the version here: too many
    > : tools depend on it working EXACTLY as it does now. "Someday"
    > : we'll update.
    >
    > : Thanks for the updated info. :)
    >
    > Text::Balanced says it requires perl 5.005
    >
    > (Which is much less than 5.6.anything)
    >
    > so I don't understand why you don't just install the module and use it.


    I will do that, now that I have been informed of the ACTUAL name
    of the module. This whole thread started with my question:
    Is it named "Text::Balanced" or "Balanced::Text"?
    Rather hard to FIND, much less install, a module you don't
    know the name of. :/

    The perldoc for our version of Perl does NOT contain the same
    text that Mr. McClellan quoted from, so his latest response was
    the first one to give me the info I requested.

    I wasn't bemoaning not being able to install that module; as you
    pointed out, it's quite possible to do. I was just pointing out
    that our installation, being older, doesn't have the latest docs
    with it, so I didn't have the info Mr. McClellan quoted, and there
    are certainly other bits of info not on this installation as well.

    Mike
     
    MPBroida, Oct 27, 2003
    #10
  11. MPBroida <michael.p.broida@boeing_oops.com> wrote:

    > Malcolm Dew-Jones wrote:

    ....
    >> so I don't understand why you don't just install the module and
    >> use it.

    >
    > I will do that, now that I have been informed of the ACTUAL
    > name of the module. This whole thread started with my
    > question:
    > Is it named "Text::Balanced" or "Balanced::Text"?
    > Rather hard to FIND, much less install, a module you don't
    > know the name of. :/


    http://search.cpan.org/ is a useful tool....
     
    David K. Wall, Oct 27, 2003
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Garrek
    Replies:
    3
    Views:
    595
    Bobby Ryzhy
    Jul 12, 2004
  2. Mark Wilson
    Replies:
    2
    Views:
    173
    Robert Feldt
    Sep 25, 2003
  3. Wenjie
    Replies:
    1
    Views:
    123
    Anno Siegel
    Sep 17, 2004
  4. PerlFAQ Server
    Replies:
    0
    Views:
    152
    PerlFAQ Server
    Jan 9, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    177
    PerlFAQ Server
    Apr 19, 2011
Loading...

Share This Page