Re: Using Perl to Read jar file MANIFEST file.
On 5 mar 2008, at 19.23, Michael Barto wrote: Has anybody every tried to create a Perl program ro read the contents of the MANIFEST file in java jar file? We are trying to develop something to provide comparisons for change between different implementations. Is this a simple Perl backtic, system or exec of the jar command or is there a more exotic way to do it? Also, we need to extract Checksum. But that seems documented. If I remember correctly JAR files are simply Zip files so you should be able to use something like Archive::Zip to read the file. Cheers Claes
Re: Using Perl to Read jar file MANIFEST file.
#!/usr/bin/perl use strict; use warnings; use Archive::Zip qw(:ERROR_CODES :CONSTANTS); use Archive::Zip::MemberRead; my $archive = Archive::Zip-new(); die read error if $archive-read(shift) != AZ_OK; my $fh = Archive::Zip::MemberRead-new($archive, META-INF/ MANIFEST.MF); while (defined($_ = $fh-getline())) { print $_\n; } galaxy:~ claes$ perl jar_reader.pl /usr/share/java/junit.jar Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By: 1.5.0_04-b05 (Sun Microsystems Inc.) seems to work /Claes On 5 mar 2008, at 19.40, Claes Jakobsson wrote: On 5 mar 2008, at 19.23, Michael Barto wrote: Has anybody every tried to create a Perl program ro read the contents of the MANIFEST file in java jar file? We are trying to develop something to provide comparisons for change between different implementations. Is this a simple Perl backtic, system or exec of the jar command or is there a more exotic way to do it? Also, we need to extract Checksum. But that seems documented. If I remember correctly JAR files are simply Zip files so you should be able to use something like Archive::Zip to read the file. Cheers Claes
Re: Proposed Mac::Pasteboard
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)
Re: Perl OpenGL 0.55 - Need Mac testers
On 19 apr 2007, at 23.21, David Romano wrote: Sherm Pendley wrote on Thu, Apr 19, 2007 at 01:10:11PM PDT: It needed a few tweaks to build, but once the build issues were sorted, the spinning texture-mapped cube test runs fine on my G4 w/ ATI Radeon 9000 Pro. Diff with the build changes is attached, if anyone else feels like testing it. Thanks Sherm. With your tweaks, it also builds and tests fine on my Mac Mini w/ATI Radeon 9200. As does it on my MacBook (first gen) w/ Intel GMA950 with the patch applied running 10.4.9 Compiled and tested with 5.8.6 (the one Apple ships): No warnings, no errors 5.8.8: Got a warning: OpenGL.c: In function 'XS_OpenGL_glutInit': OpenGL.xs:11329: warning: ignoring return value of 'Perl_av_shift', declared with attribute warn_unused_result however it runs just fine 5.6.2: No warnings, no errors /claes
Re: AppleScript Interface
Hi, On 15 jun 2006, at 02.18, Thane Norton wrote: Up until now, I have done all of my perl-AppleScript interfacing using osascript. I am planning on writing an script that does a lot of Scripting in OmniGraffle, and was wondering if anyone has any experience with the CPAN AppleScript packages that are available. Specifically I am looking at Mac::AppleScript or MacPerl::AppleScript. Thoughts? There is Mac::Glue on CPAN (http://search.cpan.org/~cnandor/Mac- Glue-1.25/) for doing AppleEvents stuff (like AS does) but with a Perlish interface. I haven't used it personally but it sure looks nice. Cheers, Claes