Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 49 lines (35 sloc) 1.103 kB
96ceb8b @rcaputo Initial revision
authored
1 # $Id$
b79568a @rcaputo bumped up the version, and removed the documentation
authored
2
3 # Copyright 1998 Rocco Caputo <troc@netrus.net>. All rights reserved.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the same terms as Perl itself.
6
7 # Contributed portions of POE may be copyright by their respective
8 # contributors. Please see `POE.pod`, `perldoc POE`, or `man POE` for
9 # real documentation.
96ceb8b @rcaputo Initial revision
authored
10
11 package POE;
12
eadab91 @rcaputo remove local $SIG{'__DIE__'} damnit
authored
13 use vars qw($VERSION);
14
297b51b @rcaputo bump the subversion
authored
15 $VERSION = "0.05_03";
96ceb8b @rcaputo Initial revision
authored
16
17 use strict;
372c3a1 @rcaputo Tweaking to get Makefile.PL working correctly.
authored
18 use Carp;
19
20 sub import {
21 my $self = shift;
22 my @modules = grep(!/^(Kernel|Session)$/, @_);
23 unshift @modules, qw(Kernel Session);
24
8429c0a @rcaputo forward module exports to the package using POE directly
authored
25 my $package = (caller())[0];
26
372c3a1 @rcaputo Tweaking to get Makefile.PL working correctly.
authored
27 my @failed;
28 foreach my $module (@modules) {
8429c0a @rcaputo forward module exports to the package using POE directly
authored
29 my $code = "package $package; use POE::$module;";
30 eval($code);
31 if ($@) {
babfbeb @rcaputo propagate error messages from modules to user
authored
32 warn $@;
33 push(@failed, $module);
34 }
372c3a1 @rcaputo Tweaking to get Makefile.PL working correctly.
authored
35 }
36
37 @failed and croak "could not import qw(" . join(' ', @failed) . ")";
38 }
96ceb8b @rcaputo Initial revision
authored
39
40 #------------------------------------------------------------------------------
41
42 sub new {
43 my $type = shift;
44 croak "$type is not meant to be used directly";
45 }
46
47 #------------------------------------------------------------------------------
48 1;
Something went wrong with that request. Please try again.