$flags->as_arrayref directly



I thought to call a Glib::Flags as_arrayref directly like

    myexpression()->as_arrayref

inspired by other as_arrayref funcs, and because it seemed a little
cleaner than lots of brackets

    [ {myexpression()}]

Alas as_arrayref requires the "overload" three args.  I wonder if that
could be relaxed per below.  The test case is actually a good example of
the method looking cleaner than the overload, though no doubt it's a
matter of personal preference.

I wondered if the "PROTOTYPE:" in the xs was meant to allow this
already, except it doesn't. :-)  That's something else is it?

Attachment: flags-arrayref.diff
Description: Text Data


-- 
"Never bolt your door with a boiled carrot."


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]