in reply to Abusing attributes (possible perl bug?)

I don't know if it is a bug or "by design" but you can not split attributes over several lines.
  • Comment on Re: Abusing attributes (possible perl bug?)

Replies are listed 'Best First'.
Re^2: Abusing attributes (possible perl bug?)
by acid06 (Friar) on Feb 08, 2006 at 14:04 UTC
    Well, then I guess it's a bug since then it should probably emit a parser error.

    But note that this works:
    sub CLASS_DEFINITION: ATTRIBUTES: PRIVATE: pvt_at1 pvt_at2 pvt_at3 PROTECTED: ptc_at1 ptc_at2 ptc_at3 PUBLIC: pub_at1 pub_at2 pub_at3 METHODS: PRIVATE: pvt_mt1 pvt_mt2 pvt_mt3 PROTECTED: ptc_mt1 ptc_mt2 ptc_mt3 PUBLIC: pub_mt1 pub_mt2 pub_mt3 ;

    code edited: missing ':'
    It gets interpreted to a lot of attributes. And it spans multiple lines.

    Just a side note, but I actually wrote code that handles this sort of attribute depiction and creates the accessors methods and such.

    Somehow, yesterday this all seemed like a very good idea but today it seems like a brain-dead way to do things.
    But I'm still curious about all of this. Should I report it as a bug or something like that?


    acid06
    perl -e "print pack('h*', 16369646), scalar reverse $="
      the bug seems to affect only expressions where opening {, [ and { do not match clossing }, ] and ) on every line.

      and yes, you should report it.

        and yes, you should report it.
        Note, however, that problem is inherent to the perl parser, and not specific to the Attribute::Handlers module. So please report it via perlbug.

        Damian