> and then write Mac::Clipboard using Mac::Pasteboard to expose only the
 clipboard.  In the SEE ALSO section you can reference Mac::Pasteboard
 and people who need the advanced functionality can find it.

Interesting thought. The straightforward implementation would be to
have Mac::Clipboard depend on Mac::Pasteboard (since there's no
simplified clipboard interface that I have found). But it seems un-
parsimonious to me to use namespace for maybe a dozen lines of Perl,
since right now the "clipboard" part is on the order of

Given that Pasteboard offers a lot more functionality than just pbcopy/pbpaste, I would have though Clipboard would similarly offer all the functionality of Pasteboard, except only to the default standard clipboard.

So where Mac::Pasteboard might have a function that returns the list of flavors of the fifth item in the a specific pasteboard, Mac::Clipboard would have a function that returns the list of flavors of the fifth item, but only in the default system clipboard.

Obviously, you want some nice easy routines to extract the clipboard flavours as text (getting the unicode text if possible, the plain text if not), but you want that same functionality for all Pasteboards as well as for the system clipboard, so you would again have a function in Mac::Pasteboard that returns the text of the top item of a specified pasteboard and a function in Mac::Clipboard that returns the text of the top item in the system clipboard.

If Mac::Pasteboard is implemented in a functional manner, then you could use "undef" as the pasteboard parameter to specify the system pasteboard.

If Mac::Pasteboard is implemented in an OO manner, then Mac::Clipboard would be essentially identical, except instead of a factory function that takes a pasteboard name, it has just a factory function that returns the Mac::Pasteboard object for the system clipboard.

But regardless of the details, I think Mac::Clipboard would want to be far more than just an interface equivalent of pbcopy/pbpaste.

Enjoy
   Peter.

--
Keyboard Maestro <http://www.keyboardmaestro.com/> Macros for your Mac
<http://www.stairways.com/>           <http://download.stairways.com/>

Reply via email to