I’m starting to have a love/hate relationship with XUL::Gui. I love it because the simple pieces are easy to use, but I hate it because its documentation is horrible.
In particular, I’m trying to use the filepicker function (listed under gui functions in the main doc), but whenever I try to use it–even by copying and pasting the code example in the documentation–the filepicker command seems to go unrecognized (“Bareword 'filepicker' not allowed while 'strict subs' in use“).
My apologies if I’m missing anything obvious, but how is this function used in XUL::Gui?
The
filepickeris not exported by default, it is part of the:widgetsexport tag.You can either use
use XUL::Gui ':all';to get everything, or useuse XUL::Gui qw(:default filepicker);to get the default set of imports and the filepicker.Take a look at the EXPORT heading for more details.
Sorry the documentation is horrible, its a work in progress 🙂