Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: XP Perl Replacement for "Send to Clipboard as Filename"

by afoken (Prior)
on Aug 22, 2009 at 15:42 UTC ( #790581=note: print w/ replies, xml ) Need Help??


in reply to Re^3: XP Perl Replacement for "Send to Clipboard as Filename"
in thread XP Perl Replacement for "Send to Clipboard as Filename"

Down side, any error/warning messages disappear into aether surrounding your computer.

I once hacked a module that calls Win32::MsgBox() whenever a fatal error occurs, so you see errors even when running wperl:

package ExePM::Carp; use strict; use warnings; use base 'Exporter'; use Carp qw(); use Win32; our @EXPORT=qw(confess croak carp); our @EXPORT_OK=qw(cluck die); our $VERSION='1.00'; BEGIN { *CORE::GLOBAL::die=$main::SIG{__DIE__}=\&ExePM::Carp::die; } sub confess { ExePM::Carp::die Carp::longmess @_; } sub croak { ExePM::Carp::die Carp::shortmess @_; } sub carp { warn Carp::shortmess @_; } sub cluck { warn Carp::longmess @_; } sub die { my ($arg,@rest)=@_; CORE::die($arg,@rest) if ref($arg) || $^S || Carp::longmess()=~/ev +al [\{\']/m; $arg=join('',$arg,@rest); unless ($arg=~/\n$/) { my ($pkg,$file,$line)=caller(0); $arg.=" at $file line $line.\n"; } Win32::MsgBox($arg,MB_ICONSTOP,$0); CORE::die($arg); }; 1;

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re^4: XP Perl Replacement for "Send to Clipboard as Filename"
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://790581]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-07-03 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls