Search Results

Showing results 1 to 40 of 53
Search took 0.01 seconds.
Search: Posts Made By: MattEvans ; Forum: Perl and child forums
Forum: Perl Feb 6th, 2007
Replies: 3
Views: 4,106
Posted By MattEvans
That's pretty much what I ended up doing; I like the 'keyword' appearance of constants though.

like STATUS_ERROR instead of $STATUS_ERROR :lol:



I tried something similar; to have a package...
Forum: Perl Feb 1st, 2007
Replies: 3
Views: 4,106
Posted By MattEvans
Is there a standard way to make constants defined using the use constant pragma available to all of the packages that are use'd from an executed file?

Or even better, to make the constants defined...
Forum: Perl Jan 28th, 2007
Replies: 1
Views: 3,583
Posted By MattEvans
I had a similar intention, and hit exactly the same problem (worked offline but not online); here's what I did:

http://www.daniweb.com/techtalkforums/thread63673.html

That relies on you being...
Forum: Perl Jan 21st, 2007
Replies: 6
Views: 15,581
Posted By MattEvans
Perl is quite bad (or good depending on how you look at it) for crypticness.

I never use those superglobal variables as implicit parameters or targets; it scares me ;)

But I'd much rather be...
Forum: Perl Jan 21st, 2007
Replies: 6
Views: 15,581
Posted By MattEvans
That's madly tiny and cryptic :cheesy:

I've been working in Java today for a college project; I used Java for yeaars before I used Perl..

To do something similar to that in Java would be a...
Forum: Perl Dec 22nd, 2006
Replies: 7
Cgi
Views: 2,271
Posted By MattEvans
I just advised someone to try that out (XAMPP)... I've never had problems with it, but I never used it all that much...

What are the specific problems with XAMPP? It's quite a 'light' distribution...
Forum: Perl Dec 22nd, 2006
Replies: 1
Views: 3,100
Posted By MattEvans
hey, no worries, i found the caller() function... even better i can call it retrospectively:

($package, $filename, $line, $subroutine, $hasargs, $wantarray, $evaltext, $is_require, $hints,...
Forum: Perl Dec 22nd, 2006
Replies: 1
Views: 3,100
Posted By MattEvans
In certain cases, it's correct for my app to die if it encounters a potentially dangerous condition... I'm working on a more detailed error reporting system, and among the things I want to list are;...
Forum: Perl Dec 3rd, 2006
Replies: 1
Solved: dynamic "use"
Views: 3,596
Posted By MattEvans
Ahh... solved it... Seems on my server I have to put everything in the eval block, pull the resultant object out of the eval block, AND explicitly define just where the eval is...

Something like...
Forum: Perl Dec 3rd, 2006
Replies: 1
Solved: dynamic "use"
Views: 3,596
Posted By MattEvans
is it possible, to use, or otherwise import and access the class in a .pm file by a suggested name (this would be after compilation)...

here's the lowdown, I've been working on a project for a...
Forum: Perl Nov 28th, 2006
Replies: 4
Views: 2,242
Posted By MattEvans
should be the same if you use a correct path to the binary. some functions to access the binary will be different (won't work), but calling open $out," | *.exe" or exec(*.exe) should work the same......
Forum: Perl Nov 22nd, 2006
Replies: 8
Views: 3,110
Posted By MattEvans
fasthosts are very bad,

at my job, we have quite alot of client sites hosted on fasthosts with windows. I find their installed PHP modules are lacking, advertised support for "precompiled CGI"...
Forum: Perl Nov 14th, 2006
Replies: 3
Views: 4,307
Posted By MattEvans
what do you mean by block? subroutine scope or method scope?

if you do one regex then another within a subroutine, you don't need to reset $1,$2,$3 etc, the next regex will overwrite the old...
Forum: Perl Nov 12th, 2006
Replies: 8
Views: 3,110
Posted By MattEvans
use a better webhost :P

i find that on IIS (microsoft servers) i don't need to change permissions to use Perl files, and if i use FTP from the DOS prompt, it sets permissions to 755...
Forum: Perl Nov 12th, 2006
Replies: 10
Views: 5,304
Posted By MattEvans
i tried uploading your script, from dos, to an apache and an IIS server. it worked fine both times.

what editor did you save your file using? the editor could have put incorrect line terminators,...
Forum: Perl Nov 10th, 2006
Replies: 1
Code Snippet: An extremely safe eval
Views: 7,678
Posted By MattEvans
Ever wanted to evaluate a user-provided expression, maybe from a form input or otherwise, and return the result? eval($expr) is dangerous because eval(open $out, "> file.what"); will open the file,...
Forum: Perl Nov 10th, 2006
Replies: 10
Views: 5,304
Posted By MattEvans
how did you put your file onto the server? did you upload it in ASCII mode? binary mode wont work. I had big problems using Windows FTP as it assumes the filetype and doesn't seem to have any...
Forum: Perl Nov 7th, 2006
Replies: 2
Views: 7,529
Posted By MattEvans
i know it's the ultimate cliché advice, but try searching for how to do each part on google/etc.

how do you want to connect to the servers? if you can do these things by getting into a servers...
Forum: Perl Nov 5th, 2006
Replies: 2
Views: 4,848
Posted By MattEvans
whatabout pipes?

open my($what), "| bin/what.exe -p whatever";
close ($what);

you should be able to read back live/streaming status if the program sends it... and you can definately send a...
Forum: Perl Nov 4th, 2006
Replies: 12
Views: 3,431
Posted By MattEvans
hmmm that's strange... i start alot of my modules:


#!/usr/bin/perl
package X::X;
use Y::Y;
require Z::Z;
our(@ISA) = Z::Z;
1;
>>> and then put the code o_O
Forum: Perl Nov 2nd, 2006
Replies: 12
Views: 3,431
Posted By MattEvans
have you read this: http://search.cpan.org/~autrijus/PAR-0.85/script/pp?

are you using the GUI interface for PP? I would try from the command line, and takenote of:



however, i would...
Forum: Perl Oct 30th, 2006
Replies: 7
Views: 2,721
Posted By MattEvans
well. that's certainly better! i didn't realise i'd be able to access up there without using a different file access method. but seems as simple/even simpler than what i was doing before.

cool...
Forum: Perl Oct 28th, 2006
Replies: 7
Views: 2,721
Posted By MattEvans
>_<

I guess if they're not important, I'll just read my error page and output that. It would have been nice if the .htaccess was obeyed.. but only in this case... I'm certainly glad I can use...
Forum: Perl Oct 28th, 2006
Replies: 7
Views: 2,721
Posted By MattEvans
Hmm.. since i found out that query string was an environment variable; I only use CGI::Carp, everything else is just a print.

If the browser sees the Error Status Code, will it not just spit out...
Forum: Perl Oct 28th, 2006
Replies: 7
Views: 2,721
Posted By MattEvans
My custom error pages (via.htaccess) work for browser requests, but when I print out an error status code from a cgi script, it bypasses .htaccess. I can't see any problem with just reading in an...
Forum: Perl Oct 28th, 2006
Replies: 12
Views: 3,431
Posted By MattEvans
Maybe it is the Inline package itself that is missing from your resulting executable... do you reference any other packages that aren't in YOUR directory structure? i.e things from CPAN, and things...
Forum: Perl Oct 26th, 2006
Replies: 12
Views: 3,431
Posted By MattEvans
hm, i didn't read your topic thouroughly, didn't realise you'd gone for the exe option in the end... there may be a problem with the linkage of things that you have compiled; are there complete...
Forum: Perl Oct 26th, 2006
Replies: 18
Views: 21,995
Posted By MattEvans
ah... i had to type it all out before i remembered that... -_-
Forum: Perl Oct 26th, 2006
Replies: 18
Views: 21,995
Posted By MattEvans
make sure you have an open command prompt window rather than typing the command into the Start > Run box. to open a command prompt window that wont disapear on completion, type cmd in the Start > Run...
Forum: Perl Oct 26th, 2006
Replies: 12
Views: 3,431
Posted By MattEvans
do you import (use/require) the pm properly? does the pm file return 1 by default? does the pm file have a package definition? is it in the correct folder? there's a long list of checks...

heres...
Forum: Perl Oct 25th, 2006
Replies: 3
Views: 3,494
Posted By MattEvans
Use this replace block:


s|((?<![\w\d])pi(?![\w\d]))|3.14|g


It has a negative lookbehind (?<![\w\d]) and lookahead (?![\w\d]) for characters preceeding and following the word pi. For more...
Forum: Perl Oct 21st, 2006
Replies: 7
Views: 3,888
Posted By MattEvans
the best way to parse XML is to ensure it is always strict :) have you looked at methods like XSLT for rendering HTML pages? I reckon you COULD even build an entire BB solution in XSL, although it'll...
Forum: Perl Oct 20th, 2006
Replies: 7
Views: 3,888
Posted By MattEvans
To elaborate on what Kevin said, you're gonna find working this ^ way to get more and more unworkable as your project gets bigger. I'm also working on some BB script in Perl at the moment, I've found...
Forum: Perl Oct 19th, 2006
Replies: 4
Views: 6,948
Posted By MattEvans
I had a quick look at some of the Inline package documentation yesterday... It seems like you have an effective equivelent of C++ when you are using the package, so to terminate a C++ process will...
Forum: Perl Oct 18th, 2006
Replies: 4
Views: 6,948
Posted By MattEvans
do you want to stop a perl thread or a thread in an unrelated process?

the exit command should stop a perl thread. die may kill all threads (although it probably shouldn't?) and kill can be used...
Forum: Perl Oct 14th, 2006
Replies: 11
Views: 4,776
Posted By MattEvans
Wahey... I have got it working how I originally wanted without the problem I just mentioned..

It doesn't seem conventional certainly.. And there is a potential risk of the user hitting Refresh...
Forum: Perl Oct 14th, 2006
Replies: 11
Views: 4,776
Posted By MattEvans
You're right! I've changed my methods somewhat, and all my pages are processed by a CGI script. A side effect of that is that now I can pass GET/POST requests through the current page; making it...
Forum: Perl Oct 12th, 2006
Replies: 6
Views: 2,245
Posted By MattEvans
The perl interpretter is written in C but .pl files aren't executable. You can't make them executable without using some kind of Perl-to-C translater.

I wouldn't advise translating them!
Forum: Perl Oct 11th, 2006
Replies: 2
Views: 2,450
Posted By MattEvans
ah.. got it. disregard this!

%ENV->{REQUEST_URI} returns the path/file. that's useable.
Forum: Perl Oct 11th, 2006
Replies: 2
Views: 2,450
Posted By MattEvans
I've just registered a MIME handler for a custom filetype; I've got the basic redirection sorted, all files of type XRM get sent to a 'dumb' perl script that echos predefined values.

But, how do...
Showing results 1 to 40 of 53

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC