Hi,
I assume with pasteboard you mean the clipboard?
There seems to be an attempt of a generic cliboard interface on CPAN (http://search.cpan.org/dist/Clipboard/
) which according to the readme says it works on OS X. I suppose it
just uses the 'pbcopy' and 'pbpaste' command line tools.
Cheers,
Claes
On 21 jan 2008, at 04.15, [EMAIL PROTECTED] wrote:
Dear All,
I don't know if I'm re-inventing the wheel here, so I thought I'd ask.
Is there a module that will let one manipulate a Mac OS X
pasteboard? There does not seem to be anything on CPAN that strikes
me as being for that purpose. I kind of expected something in
Mac::Carbon to do the job, but if it's there I can't find it. Of
course, I'm perfectly capable of not seeing my nose in front of my
face ...
I have been hacking around with a .xs module based on the Pasteboard
interface. This means it requires at least Mac OS 10.3 (Panther). So
my questions for the mailing list are:
Have I re-invented the wheel? If so, where should I have looked that
I didn't for this functionality?
Is there any interest in publication of this module? Putting data on
and taking data off the pasteboard appear to work now. I haven't
looked into promised data at all, and can't promise to support it in
the future. I also don't anticipate the module being smart enough to
figure out the appropriate flavor for a given datum, or other
"flavor-aware" functionality. Also, I haven't yet figured out where
to put everything to support Module::Build, so it's
ExtUtils::MakeMaker for now. It's an o-o interface, with an object
representing a pasteboard. There are a couple convenience routines
exported by default (should they be?) called pbcopy() and pbpaste(),
which instantiate an object to access the system clipboard, access
it, and then throw the object away. The flavor and synch flags would
be exportable as constants.
If I end up publishing, what name should I use? It appears that most
Mac OS specific things have been dumped into the Mac:: name space,
Dan Kogai's MacOSX::Files being the exception. The proposal was
Mac::Pasteboard because that's the interface used (rather than the
scrap manager).
And a meta-question: what other information do I need to supply for
people to be able to comment meaningfully?
Thank you very much,
Tom Wyant (mailing address to the contrary notwithstanding)