stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Simple IO Handling with IO::All







Simple IO Handling with IO::All

Simple IO Handling with IO::All 04/09/2004 04:00 PM

Perl module author extraordinaire Brian Ingerson demonstrates his latest creation. IO::All ties together almost all of Perl's IO handling libraries in one neat, cohesive package.




This is a GrokNews Entry: (what is grok?)





Similar Items

Simple IO Handling with IO::All

Grok Headline matches for Simple IO Handling with IO::All

Advanced Error Handling: Writing an
Error Handling Class


Advanced Error Handling: Writing an
Error Handling Class
11/10/2003 11:25 PM
If you're tired of the default error handler and want to have complete control over default error messages, you should write your own error handling class. Writing your own handler will enable you to change the way php handles your error messages, and allows you to create your own error types. With this class you will be able to send error messages to a log file, or send error reports via email.

Simple and Secure isn't so Simple


Simple and Secure isn't so Simple 09/02/2004 09:24 PM

More on XML Error Handling


More on XML Error Handling 01/22/2004 02:56 AM

I thought I'd respond to a few of the comments I received:

Many people suggested that there be a built-in validator in the browser that could show the errors to the developer. The validators basically break down into two types: obtrusive validators and unobtrusive validators.

If the validator is unobtrusive, then I would argue that it won't receive sufficient usage to make a difference. If the browser doesn't impose a penalty of some kind, then there will be no incentive for the author to correct mistakes.

I can see the value of an obtrusive validator, as long as the obtrusive part was only checking well-formedness (i.e., really basic mistakes).

(2) Some people pointed out that my own blog was not valid. I have two responses to that:

(a) I am not arguing for perfectly valid XML documents. I am arguing for well-formed XML documents. There is a difference. I think asking that the page be well-formed is setting the bar fairly low. For example, one of the current errors on this blog is that I have two elements with the same id. While this makes the blog invalid, it does not have any effect on the blog being well-formed. At least I don't think it does. :)

(b) I'm illustrating a point, namely that I have no reason to make the blog valid, given that browsers will display the blog anyway.

(3) People complained that I wasn't serving up XHTML. I can't actually serve up XHTML if I want the blog to be displayable in all browsers, including Safari, which still has sufficient issues with XHTML that I can't make that switch yet.

(4) My comments on HTML error handling were largely misinterpreted.

Some people thought I was attacking WinIE for its permissive handling of HTML. I was not, and I'm glad others appreciated that fact. Back in the 90s WinIE had to emulate the permissive error handling of the then-dominant browser Netscape. They had no choice if they wanted Web sites to be viewable as the designer intended. They were in the same position then that Safari is in now.

Nor am I suggesting that WinIE should become less tolerant of malformed HTML, or that they are at fault for not doing so. That is simply not a logical conclusion to have drawn from my previous comments. You can't take a Web site (even a malformed one) that works a certain way and suddenly refuse to render it or even render it radically differently than before.

For HTML, this issue was resolved long ago in favor of permissive error handling and recovery, and no modern browser is to blame for that situation.

Others said a browser that handles malformed HTML is better than one that does not, and if Safari doesn't handle all this malformed HTML, then it's simply not as capable a browser.

What amused me about this comment is that there is no definition of what it means to handle malformed HTML. As long as a browser shows you something and doesn't crash, it has handled the malformed HTML. What people don't understand is that you don't simply have to handle the malformed HTML. You have to handle it in exactly the same way as the Web browser that the site author designed for.

If you do not, you'll end up with different renderings of the same page, which as I said before, constitute the largest set of rendering differences between Web browsers. Perfect emulation is what makes error recovery so difficult. If you allow grossly malformed pages, then most XML on the Web will end up being grossly malformed (as is the case with HTML today).

Once you have a Web full of grossly malformed XML, there will be one dominant browser that designers will check to see if the site looks ok. They will then make assumptions that other browsers will recover from the malformation errors in precisely the same way and will simply assume that it is the fault of the other browsers if they don't.

Right now it is the responsibility of alternate browsers to emulate the dominant browser's error recovery strategies, but there's simply no reason to do that for XML as well.


Handling events in C#


Handling events in C# 10/01/2002 11:42 PM
CNET Oct 1 2002 10:01PM ET

i hope they get the handling for each
car different.....and


i hope they get the handling for each
car different.....and
08/15/2004 11:04 PM
TechTree Aug 16 2004 2:49AM GMT

xml handling tools


xml handling tools 08/15/2004 02:14 AM
delay of developping

RFC: virus handling


RFC: virus handling 01/28/2004 03:36 PM
Thomas Zehetbauer (Jan 28 2004)

Handling non-UTF-8 filename


Handling non-UTF-8 filename 06/05/2005 11:13 PM
G_FILENAME_ENCODING variable and convenient filename functions work.

PHP Form Handling


PHP Form Handling 08/27/2004 02:13 PM
If your PHP program is a dynamic web page (and it probably is) and your PHP program is dealing with user input (and it probably is), then you need to work with HTML forms. David Sklar, author of Learning PHP 5, offers tips for simplifying, securing, and organizing your form-handling PHP code.

Handling RSS in the browser


Handling RSS in the browser 02/01/2005 09:34 PM

Two things slowing the understanding and adoption of RSS by mainstream consumers are that feeds are rendered as raw XML by the browser, meaning that someone clicking on a feed link gets a lot of code they see as gibberish; and that subscribing to a feed is usually a multi-step process of finding a feed, copying the link, opening up the subscription mechanism of the feed reader, and pasting the link in.

To solve both these problems some feed readers have created buttons that can be placed on a web site for a one-click subscription to that feed in the reader. Instead of getting code when you click it, you get your feed in the feed client. Web-based readers take this a step further in that you don’t even need a reader installed to for the button to do you some good, so anyone who likes your content can easily add it to My Yahoo for instance. This has lead to a proliferation of “Subscribe with X” buttons on some sites (indeed, look at how my feed is rendered in the browser with a stylesheet and you’ll see some of these buttons on the right).

Dave Winer has a problem with this, and rightly so. But his solution is a little heavy-handed. We don’t need some big centralized service (or lots of little centralized services) that process feeds and figure out how to make them work on the end-user’s particular preferred setup.

Jeremy̵ 7;s right in saying this is a client-side problem, not something that needs to be solved at the server level, but the idea of creating a single helper app that lets people easily add a feed to their preferred aggregator still makes things too complex and shifts the responsibility for improving the user experience away from where it belongs: to the feed client itself.

There’s more than one client that can handle audio files on the Web. When I click an audio file, I don’t get a bunch of code, or some generic server- or client-side helper app figuring out what I want to do with the file. What I get is the audio opening up in Winamp, or Zinf, or Media Player, or whatever is the default player for audio files on my server. This happens because my browser recognizes that the file type it’s downloading has a default action and the OS knows how to open a file in the player. With a PDF, the browser sees a content type of application/pdf and opens the PDF in whatever application the user has installed to handle PDF files. If I have more than one installed, then the default one is used (default generally being whichever one I installed last).

Feed readers need to do the same thing. When I install a desktop reader, the reader should (perhaps optionally) find all the browsers installed on the system and configure them to open files with a content type of application/rss+xml in the reader. The reader then does whatever with it, perhaps showing it to the user and allowing them to subscribe.

Web based readers would need some sort of small install that would redirect that request to them, just as web based mail clients like Gmail need a small program to get mailto: links to open the web mail composition widget.

Of course this would also require that everyone serve RSS as the same content type or for the readers to handle multiple content types. Unfortunately the RSS spec doesn’t specify which content type should be used, so people have made up their own, often different, content types.

People often forget that many of the problems faced by RSS and Atom are not new. They’ve already been solved, so instead of reinventing the wheel we should use the existing standards.

Update: Joe Gregorio has mentioned this before and describes in technical terms how a reader can do exactly this with C# and Windows for Atom. The concepts, however are applicable to and feed format, programming language, and OS.


Event handling in php web applications


Event handling in php web applications 01/25/2003 12:45 AM
An interesting discussion triggered on sitepoint forums, regarding approaches to event handling in PHP applications. Theres a lot of cross-over here from the paradigm of object oriented 'enterprise' architecture, and it perhaps indicates an increasing shift in the way that the PHP language is being used.

Zend: PHP 101 - Error Handling in PHP


Zend: PHP 101 - Error Handling in PHP 02/01/2005 09:14 PM
In Part 12 of their PHP 101 series, Zend the latest editon posted - Bugging Out (Absolute Beginners: error handling).

Error handling in Web applications


Error handling in Web applications 12/02/2002 01:17 PM

Error Handling, Apache and PHP


Error Handling, Apache and PHP 02/17/2003 08:07 AM
Error Handling, Apache and PHP I'm on record as using this for my sites so here's a good tutorial that I can endorse fully: Using PHP and Apache, you can turn your "Page Not Found" messages into more than bland error reports. You can serve an alternate page based on the name of the page that was not found, create a page on the fly from a database, or send an email about the missing page to a webmaster. [_Go_] How else do you think you got this beautiful picture? True there are a lot more things I could have done with it (which are covered in this tutorial).

Exception handling in Java


Exception handling in Java 05/27/2004 12:16 AM
No, this isn't yet another rant on checked vs non-checked exceptions. It's just a link to an excellent article on exception handling by Heinz Kabutz. Heinz drew me into reading the article with the very first sentence (which I completely agree with): In my experience, all Java projects contain poorly written exception handling code. He then shows how exception handling... (176 words)

Handling optional parameters in C#


Handling optional parameters in C# 09/20/2002 11:24 PM
CNET Sep 20 2002 10:02PM ET

Handling Web services with care


Handling Web services with care 12/07/2003 09:25 AM
Sterling Commerce senior VP Terry Noreault says caution should still be the byword for IT managers weighing their next move.

New refuse handling systems in HK


New refuse handling systems in HK 06/18/2004 12:25 AM
Content.sina.com - Thu Jun 17, 08:32 pm GMT

Event Handling In Java


Event Handling In Java 10/28/2003 11:06 PM
In life, you encounter events that force you to suspend other activities and respond to them immediately. In Java, events represent all activity that goes on between the user and the application. Java's Abstract Windowing Toolkit (AWT) communicates these actions to the programs using events.

Exception Handling In DTML


Exception Handling In DTML 08/21/2002 06:08 PM
Ever wondered if there was a way to stop Zope from barfing error messages all over your screen when one of your scripts crashes and burns? Well, guess what - there is! Meet the and tags, which can be used to trap and resolve errors in script execution.

XML Error Handling in Web Browsers


XML Error Handling in Web Browsers 01/19/2004 12:39 AM

I've been following the topic of XML error handling on Mark Pilgrim's blog with great interest. Go read this blog entry. Done? Good. Now go read this blog entry.

Safari has draconian XML error handling. If the file isn't well-formed, Safari won't display it. Mozilla does the same, which should come as no surprise, since the two browsers use the same open-source XML parser (expat).

I fall squarely into the draconian camp and agree with Tim Bray. Fully half of the bugs I receive in WebCore are not bugs at all, but are essentially differences in error handling and error recovery between Safari and the dominant Web browser, WinIE. None of these issues occur with XML.

If we lived in a world where browsers could refuse to display malformed content (with useful error notification of course so that authors could easily repair their content), then all of these "bugs" would simply disappear. I could focus my efforts on real DOM and CSS bugs, and not have to waste my time emulating the behavior of WinIE.

Relaxing restrictions on well-formedness is a slippery slope, and where does it end? Consider all the "helpful" rules that exist in HTML today thanks to early versions of Netscape and WinIE. Did you know that any h1-h6 tag can close any other h1-h6 tag? Try it. Open an h1, type some text and then put in a close h2. It will close up the h1 in WinIE and Mozilla. (I haven't yet fixed this "bug" in Safari.) Try specifying a close tag for a paragraph by itself. You'll get an empty paragraph in Safari, Mozilla, and WinIE.

Of course the most complicated error recovery problem is residual style, which I have blogged about at length. This "helpful feature" (note the sarcasm) allows you to accidentally mis-nest style tags like the italic and bold tags and basically treat HTML more like a stream of "on/off" states than an actual tree structure. This feature is more a by-product of primitive browsers from the 90s that didn't have true DOMs than an actual intended error recovery system.

There's also the missing quotes problem, e.g., leaving a close quote off a link href. Browsers employ complicated heuristics to try to match up unclosed quotes that depend on the number of quotes in the document, their positions, and other factors. Safari doesn't really handle this problem that well yet, and it shouldn't have to.

The whole reason nearly all Web pages on the Internet are malformed is because browsers let Web page authors get away with it. As long as browsers are permissive in their error handling and recovery, Web authors will continue to produce invalid Web pages, because they won't even have any idea the pages they are authoring are invalid!

People in the error recovery camp then suggest ideas like icons in the status bar, or error messages dumped to some obscure console, but the average Web designer isn't going to know or care about validation as long as WinIE displays the Web site adequately. The only way you can make the average Web designer care is to get in his face with the obvious errors. The browser has to make a face and refuse to eat the swill that is being force-fed to it, or the average designer is simply going to shrug and say, "Well, close enough."

The crux of the problem with implementing true error recovery is that it must be unambiguous. Every Web browser has to recover from malformed content in precisely the same way. This means that in order for browsers to be tolerant of malformed content, there would have to be a specification regarding how to handle all possible malformations. This is virtually impossible to specify, so why waste time and energy on it when creating well-formed XML files is so ridiculously simple?

I think people who don't work on Web browsers for a living have no concept of just how malformed the Web really is, so let me state this as clearly as I can:

The #1 reason that HTML pages render incorrectly in alternate browsers is because of differences in error handling and recovery.


Variable Handling and the PHP Novice


Variable Handling and the PHP Novice 06/26/2002 01:01 PM
In the beginning, the file was void, and without text. The Programmer brought text to the file by saying "Let there be hello world" and there was hello world, and it was good. But soon hello world was not as good as it once was, and the Programmer said "let there be change!" And where there once was static content in the file, there was now variable content. Beholding the creation, the Programmer was happy, and all was well...

History of XML Error Handling


History of XML Error Handling 01/18/2004 12:24 AM
I encourage everyone to go and read Mark Pilgrim’s remark able overview of the history of XML error-handling. His summary is In the end, Tim basically said “there are two camps here, they both have good points, we aren’t going to convince each other on this one” and then proceeded to compromise by doing it his way. Mark’s selection of out-takes from the debate would seem to support that narrative. Excuse me while I go off in a corner and shake off the megalomania. Let’s get real: even my Mom wouldn’t believe that I could single-handedly impose so fundamental a policy decision on this large and passionate a community by saying “Make it so.” What happened was, we had a really big, really long, really passionate argument on the subject; the camps came to be called “Draconians” and “Tolerants.” After this had gone on for some weeks and some hundreds of emails, we took a vote and the Draconians won 7-4. And indeed, some among the Tolerants cried foul over that vote. This was a good example of what we mean when we say “rough consensus” in that even those on the short side of the vote were willing to defend the process and the outcome; see Hollander and Sperberg-McQueen. Other interesting glimpses into this history may be found here and, giving the last word, as is appropriate, to Jon Bosak, here.

Met Police updates 999 call handling


Met Police updates 999 call handling 02/18/2004 07:33 AM
Personal Computer World Feb 18 2004 11:46AM GMT

Re: Linux ISO9660 handling flaws


Re: Linux ISO9660 handling flaws 03/19/2005 03:11 AM
Dan Yefimov (Mar 17 2005)

Linux ISO9660 handling flaws


Linux ISO9660 handling flaws 03/19/2005 03:11 AM
Michal Zalewski (Mar 17 2005)

Event Handling In Java Part II


Event Handling In Java Part II 10/28/2003 11:06 PM
With the skills that you have developed so far from Part I of the tutorial, you can design a graphical user interface with beauty and easy. Let us refresh ourselves before we proceed, Events are method calls that Javas windowing system performs whenever any element of a user interface is manipulated.

PHP Magazine: Handling Multilingual
Sites


PHP Magazine: Handling Multilingual
Sites
12/04/2003 08:30 AM
The PHP Magazine has a nice link this morning to a thread on the NyPHP mailing list about creating multilingual sites and some of the problems that might arrise.

Police evidence handling criticised


Police evidence handling criticised 08/04/2004 07:53 AM
The Police Ombudsman criticises police handling of forensic evidence after the collapse of a trial.

Strategies for handling nulls in SQL
Server


Strategies for handling nulls in SQL
Server
01/25/2003 02:50 AM
CNET Jan 25 2003 1:29AM ET

F.B.I. Is Assailed for Its Handling of
Terror Risks


F.B.I. Is Assailed for Its Handling of
Terror Risks
04/14/2004 05:08 AM
New reports on the F.B.I.'s performance were released as the Sept. 11 commission conducted sometimes harsh questioning of Attorney General John Ashcroft and others.

UN Concerned by U.S. Handling of Asylum
Seekers


UN Concerned by U.S. Handling of Asylum
Seekers
08/13/2004 09:18 PM
Reuters via Wired News Aug 14 2004 1:33AM GMT

The Evolution of Perl Email Handling


The Evolution of Perl Email Handling 06/10/2004 08:39 PM
There are many modules on the CPAN for slicing and dicing email, and we're going to take a whistlestop tour of the major ones. We'll also concentrate on an effort started by myself, Richard Clamp, Simon Wistow, and others, called the Perl Email Project, to produce simple, efficient and accurate mail handling modules.

O'Reilly PHP DevCenter: PHP Form
Handling


O'Reilly PHP DevCenter: PHP Form
Handling
08/27/2004 01:35 PM
The O'Reilly PHP Devcenter has a new article posted seeking to help you out with your form handling with a listing of several tips to get started.

Dynamic duo eases document handling


Dynamic duo eases document handling 03/26/2005 09:07 AM
Chicago Tribune Mar 26 2005 1:31PM GMT

Apache Chunk Handling Bug Detected


Apache Chunk Handling Bug Detected 06/18/2002 09:17 AM
The vulnerability could lead to DoS attacks or allow an attacker to take remote control of a server but Apache warns that a comprehensive fix is not yet available.

Builder.com: Handling Multiple Submits
in PHP


Builder.com: Handling Multiple Submits
in PHP
07/01/2004 08:47 AM
From Builder.com, there's a new posting for anyone out there trying to figure out how to handle multiple submits in the same form.

Handling Arbitrary RSS Data with
NewsGator


Handling Arbitrary RSS Data with
NewsGator
01/24/2004 10:36 PM

RSS extensions: The inventor of NewsGator shows us some of the really cool things you can do with it.

...you can define whatever extension you like, and NewsGator will be able to use it in one way of another. Let's explore how this works, and what you can do...you can take any extension data and map it to a column in Outlook...NewsGator 2.0's rendering engine now uses XSLT, and you can customize the transforms used to render the items. What's more, any custom data is available to these transforms...so you could have a custom rendering based on this data by building a new stylesheet.

This could be huge for corporate applications — RSS could be a generalized reporting stream on anything, including any statistics necessary. Using Outlook VBA, you can even trigger client-side programs when posts are received, so there's really no limit on where you could go with this.

Click here to comment on this entry


DotGeek: Error Checking and Handling


DotGeek: Error Checking and Handling 01/26/2004 08:28 AM
Well, it looks like DotGeek.org is back up and already going with new content this week, including one of their latest dealing with error checking and handling in your PHP scripts.
Grok Description matches for Simple IO Handling with IO::All
GrokA matches for Simple IO Handling with IO::All

Simple IO Handling with IO::All

The following phrases have been identified by the grok system as matching this entry:

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

This week on Perl 6,
week ending
2004-03-14

Synopsis 3
This week on Perl 6,
week ending
2004-03-21

Making Dictionaries
with Perl

This week on Perl 6,
week ending
2004-03-28

Photo Galleries with
Mason and Imager

Using Bloom Filters
Dasani Tapped Out of
Europe

DHB Industries, Inc.
Shorts Roost at
Children's Place

VoIP: Why the Light
Touch?

Laidlaw's Bumpy Ride
Rite Aid Wrings Out
Profits

A Bet on Taser
Dell Springs Forward
CA Executives Make
the Walk

Yippee for Yahoo!
NewsGator 2.0
service release for
Office XP SP3

Southland's Census
Story, in a Word:
Boom! (Los Angeles
Times)

Curbs on Outside
Deals at NIH Urged
(Los Angeles Times)

A Passion for
Rivalry in Brazil
(Los Angeles Times)

One Year Later:Where
Is Iraq? (Los
Angeles Times)

Testimony Paints
Image of Passive
Inner Circle (Los
Angeles Times)

Panel's partisan
divide exposed
(USATODAY.com)

Panel's focus falls
on Aug. 6 Bush brief
(USATODAY.com)

Ancient burial may
mark first human-cat
friendship
(USATODAY.com)

Fastest-growing
title more headache
than honor
(USATODAY.com)

Rice: No 'silver
bullet' on 9/11
(USATODAY.com)

Rotation Reassessed
as Toll Spikes
(washingtonpost.com)

Anti-U.S. Uprising
Widens in Iraq;
Marines Push Deeper
Into Fallujah
(washingtonpost.com)

Marines Try to Quell
'a Hotbed of
Resistance'
(washingtonpost.com)

Zeroing In on One
Classified Document
(washingtonpost.com)

General May Bolster
Force in Iraq;
Militias Kidnap a
Dozen Foreigners
(washingtonpost.com)

Kerry Says Bush
Makes U.S. Job in
Iraq 'Lot Tougher'
(Reuters)

Iraqi Insurgents Say
Seize Six Foreigners
(Reuters)

At Least 2 U.S.
Soldiers Killed in
Iraq on Friday
(Reuters)

White House Works to
Declassify Al Qaeda
Threat Memo
(Reuters)

Iraq in Turmoil on
Anniversary of
Saddam's Fall
(Reuters)

Golfer Rose Has
2-Stroke Lead at
Masters (AP)

Janet Jackson to Be
Live on NBC's SNL
(AP)

Pope Leads Good
Friday Procession
Prayer (AP)

Police Take Former
Enron Exec to
Hospital (AP)

Sharon Calls for
Party Vote on
Withdrawal (AP)

Gore Meets Privately
With 9/11 Commission
(AP)

Expert May Help
Decide Neb. Abortion
Case (AP)

AP Poll: Bush, Kerry
Still in Close Fight
(AP)

Iraq Abduction Puts
Japan Gov't in
Crisis (AP)

U.S. Troops Retake
Most of Key Iraqi
City (AP)

BLOGGING AND
PERSONALITY
CHANGE

YOUR
LAW

what is grok?