Re: Memory.bundle will not compile.
Good morning, You have sent a personal reply rather than to the list (or if you did send to the list it hasn't come through yet). On 13/12/13 at 1:06 PM -, Alan Fry a...@afco.demon.co.uk wrote: On 12 Dec 201323:11, at 23:11, Charlie Garrison wrote: I'm so sorry you can't do a double click on your Mac to read a Perl error message. I thought that was pretty standard in the Mac world. I didn't say I can't; I said it was easier if I didn't have to, and since you're asking for free help, why not make it easier for those you're asking to help you. Basic common sense. And again, we're talking Perl here; I can't even work out how that screen shot is related at all; where did it come from. Just copy the error message from the text output. Again, we're talking Perl. That is way off the beam. The issue is a 32/64 bit one and can be resolved by a perl version plist Prefer-32-Bit. But that's nasty thing to do IMHO. Umm, you know the solution? Then why are you asking for help? Or, you know of 'a' solution but don't share that with us so we can help you find a better solution? You've got to put some effort into helping us to help you. If you don't give us all the facts that you know (or think) might be relevant, how do you expect non-mind readers to assist? The errors arise from a call 'use Mac::OSA;'. It's broken and I gather will never be fixed. I'm not the author, so can't say. What dit the author say? Hmm, that's part of the Mac::Carbon distro. Doesn't surprise me in the slightest that it's not getting ongoing love. There are newer (better?) ways of doing things these days. And from what I can tell; it's not broken at all. It's not advertised as 64-bit compatible. Maybe your system is broken since it doesn't have a 32-bit perl. You can compile for yourself you know. I have taken it out of the script and done the job another way. Since we're still having to be mind-readers to know what your ultimate goal is, and knowing that with Perl TIMTOWTDI almost always holds true, a different solution doesn't surprise me. I can take heaps of guesses at what you really wanted to do, but that's not what you asked. I suggested some ways to solve the question you asked. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au O ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt
Re: Memory.bundle will not compile.
Good morning, On 12/12/13 at 2:59 PM -, Alan Fry a...@afco.demon.co.uk wrote: I have a script which runs fine on OS 10.6.8 but fails on 10.7.2. The error message is this: No idea what that screen shot is; we're talking perl so just use the command line. Also makes it heaps easier for us to help since we don't need to open another program to see what you're trying to tell us. Try installing Memory::Memory again. Make sure you run the tests. If the tests fail, there are probably compile options that need changing, show us the test output. If tests succeed and installs fine, and you still have the same errors, then there is something wrong with your (script) environment. In that case, test from cli and show us all error output (not a screenshot please). Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au O ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt
Re: Can't Update CPAN, Can't Install DBD::mysql
Good morning, On 28/09/11 at 3:59 PM -0400, Lola Lee Beno l...@his.com wrote: That's what I was afraid of. Apparently a previous install of make got blown away. In the process of downloading XCode from App Store (uh) . . . I had to install Xcode twice (not download, just install twice). And I seem to recall some reports from others saying the same thing. Installing twice also fixed borked xcode for a colleague. I never bothered to find out why that fixed things; just proceeded and kept working. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au O ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt
Re: New Perl-Installation on new OS X
Good morning, On 9/06/11 at 4:40 PM +0100, John Delacour j...@bd8.com wrote: One thing to remember, of course, is that to add modules with cpan to 5.14.0 so configured, rather than to Apple's installation, you need to cd /usr/local/bin; sudo ./cpan I haven't followed all of this thread (it was digressing there for a while). Would perlbrew be a solution for the OP. I've only been using it a short while but it makes installing and using a custom perl very simple. http://search.cpan.org/perldoc?perlbrew Eg: $ perlbrew install perl-5.14.0 $ perlbrew switch perl-5.14.0 $ cpan Works a treat for me. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au O ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt
Re: MacPort: how to port perl?
Good afternoon, On 9/9/08 at 9:24 PM -0400, Vic Norton [EMAIL PROTECTED] wrote: I'm not sure what this proves, David. I've tried your trick 3 times and gotten three different answers. And I don't think PERL5LIB has anything to do with any of them. What is the value of your PERL5LIB? From your perl output we can see the defaults for @INC, but without knowing the value of PERL5LIB it's hard to draw any conclusions. My experience matches David's; the PERL5LIB variable does work as advertised. Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt
Re: Using Perl to Read jar file MANIFEST file.
Good afternoon, On 5/3/08 at 10:23 AM -0800, Michael Barto [EMAIL PROTECTED] 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. Did you ask CPAN? There seems to be a few modules which might be helpful for you: http://search.cpan.org/search?query=jarmode=all Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt
Re: Formatting uploaded images
Good morning, On 15/2/06 at 12:57 PM -, Moisés Chicharro [EMAIL PROTECTED] wrote: I have a perl script which enables users to upload a jpg file to my webserver from their browser. However, I'd like to reformat the uploaded jpeg to a certain pixel width and height so that it fits in with my webpage template (and also to avoid massive files being uploaded). Is there any way to do this in perl? Quite a few ways; one of the popular ones is ImageMagick. Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: CamelBones on Intel? Maybe not.
Good evening, On 9/6/05 at 2:39 AM -0700, wren argetlahm [EMAIL PROTECTED] wrote: Hey Sherm, I haven't toyed with CB since the days of 10.2, anything I should know before diving in again? And are there any licensing issues that would prevent using CB in a commercial app? Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: BBEdit 8.0
Good evening, On 9/9/04 at 3:06 PM -0400, Sherm Pendley [EMAIL PROTECTED] wrote: Safari and reload the page. I can configure Console.app to automagically pop itself to the front of the window stack whenever anything gets appended to Apache's (or some other) error log. Then you may also be interested in Tailer+. It simply tails a log file (can do so with ssh too) but it also highlights and strips lines based on criteria such as a regex. I find it great for getting to just the data I want to see in apache error logs. After Affrus and BBEdit, it's one of the most useful tools in my arsenal. Charlie -- Charlie Garrison [EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: many module questions
Good morning, On 1/2/04 at 8:11 AM -0500, Sherm Pendley [EMAIL PROTECTED] wrote: One thing you'll need to do before installing DBD::mysql is install MySQL itself. The simplest way to do that is via Fink. You'll also need There is now a package/binary download for OSX from the mySQL site. I think that is now easier than the fink install. Of course there are still plenty of other good reasons to use fink, so if you already have fink installed, then using it to grab mysql may be just as good. And that was a great reply from Sherm for all of Christopher's questions. I had forgotten about the cpan 'look' command. I could have used that recently to save some time had I remembered it. Charlie -- Charlie Garrison[EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Using Mac::Glue to convert alias string to posix path
Good morning, I am using Mac::Glue to get alias style strings from a FileMaker database. I need to convert the string into a posix style path for manipulation in perl. I realize that Mac::Glue will convert an alias to posix path when doing a 'get'. But how do I convert the string into an alias? I'm trying to do the equivalent of the following AppleScript: set file_path to HD:Users:charlie:test_file set file_str to (POSIX path of file_path) as string -- returns /Users/charlie/test_file This is the perl version I'm trying: use Mac::Glue ':glue'; my $app = new Mac::Glue 'System_Events'; my $file_path = HD:Users:charlie:test_file; my $file_str = $app-get($file_path, as = 'posix_path'); #my $file_str = $app-obj($file_path, as = 'posix_path'); #my $file_str = $app-get($file_path, as = 'posix_file'); #my $file_str = $app-get($file_path, as = 'alias'); print $file_str\n; # want /Users/charlie/test_file I have tried different variations, and none of them are working. Maybe I'm approaching the problem the wrong way. Can anyone suggest how to convert an alias string into a posix path string? Thanks, Charlie -- Charlie Garrison[EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: searching complex datastructures
Good afternoon, On 11/12/03 at 4:55 PM -0800, wren argetlahm [EMAIL PROTECTED] wrote: --- Charlie Garrison [EMAIL PROTECTED] wrote: I'm no expert ( I'd love to hear from one). But when I need to do something similar I use a second data structure for doing the 'reverse lookup'. I thought about that, but was put off by the fact that it's a complex structure-- of course I'm only reverse-looking up one field, so it might work. I have an estimated 1-10 lookups per database entry, of which there are ~500 right now. So there might be time savings, but memory requirements might be an issue contemplating/ Exactly, which is why I ask that you post the solution here if you find something more elegant. It feels like a sledgehammer solution to me, but I've yet to find anything better. --- Fred Eiden [EMAIL PROTECTED] wrote: How about using a different data structure? Maybe a hash of hashes would work better. If the value of $xml_index is unique, $xml_index is unique (as is the name value), but the reason for the array is to sort the entries into an order which doesn't necessarily correlate with $xml_index or the name, and I look things up by their order more often than their $xml_index. I also agree with Fred's solution, but only for data which doesn't need to be sorted (which I assumed was the case for you). It is possible to expand on Fred's solution to save the initial ordering by also using a 'sort_val' key into each hash. But that starts getting just as complex: %names = ({sort_val=1, data={xml_index='a', name='abc'}}, {sort_val=2, data={xml_index='d', name='def'}} ); But then you need to do the same thing for each key that you need to do lookups for. Each 'data' hash can be referred to with references so that you only need one copy across all lookup hashes, but it still uses more memory. Can anyone offer an elegant solution for a data structure that maintains sorted order as well as access to data for a (primary) key? Charlie -- Charlie Garrison[EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: searching complex datastructures
Good morning, On 10/12/03 at 4:01 PM -0800, wren thornton [EMAIL PROTECTED] wrote: I'm working with some complex data (array of hashes in this case) and I'm wondering if there's a good way to do a reverse lookup? So far I have the following: I'm no expert ( I'd love to hear from one). But when I need to do something similar I use a second data structure for doing the 'reverse lookup'. for my $i (0.. @names-1) { if ($names[$i]{'xml_index'} == $xml_index){ $return = $names[$i]{'name'} } last if $return; } So in addition to @names, I would also have %name_xml ( maybe %name_vals too). @names = ({xml_index='a', name='abc'}, {xml_index='d', name='def'}); %name_xml = (a=1, d=2); # hash value is index into @names for # matching xml_index %name_vals = (abc=1, def=2); You could then do a lookup in @names as: $val = $names[$name_xml{'a'}]{'name'}; Which works fine, but I'm pretty sure there has to be a more efficient way to do it that will save cycles. The above will (obviously) take longer to create the data structures and will use much more memory. So if you only have the occasional lookup to do, it won't save you anything. But if you have lots of lookups to do, it will save you time. Charlie -- Charlie Garrison[EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: HTML to PDF converter
Good evening, On 23/11/03 at 9:23 PM -0700, Mike Schienle [EMAIL PROTECTED] wrote: I need to batch convert a hundred or so HTML pages to PDF on a regular basis. I've looked on the web a bit, CPAN and the last year or so of The Perl Journal, but I'm getting more confused the longer I search :-) It looks like HTML::HTMLDoc is the way to go at this point. Can someone give me an idea if that's the most appropriate module? If not, are there other recommendations? It will depend largely on what sort of html documents you have (simple text/tables vs complex layout with lots of images) and what features you need in the resulting pdf (bookmarks, clickable links, etc). I have been using html2ps for a few years. Its feature list is pretty basic, and it was written years ago. But it was the best solution (for me) at the time and I have found no reason to switch (or a better solution to switch to). Charlie -- Charlie Garrison[EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia
Re: magic bullet needed for Perl upgrades on Mac OS X
Good afternoon, On 28/2/03 at 12:39 PM, Peter N Lewis [EMAIL PROTECTED] wrote: In that case, don't even think about trying to build a smaller bundle - people in general will not even blink before 10MB these days, and in general wont worry about it until it is *much* bigger than that. I disagree. For me, I don't blink if it's under 2MB. But anythinbg over that I make a conscious decision about whether I really want it. I find file size to be a very important factor in deciding whether to download. Not everyone has even 56K connections (much less broadband) if they don't live in/near a city. Charlie -- Charlie Garrison[EMAIL PROTECTED] PO Box 141, Windsor, NSW 2756, Australia