3 package Catalyst::Plugin::Session;
6 with 'MooseX::Emulate::Class::Accessor::Fast';
8 use Catalyst::Exception ();
11 use Object::Signature ();
12 use HTML::Entities ();
14 use List::Util qw/ max /;
16 use namespace::clean -except => 'meta';
18 our $VERSION = '0.40';
19 $VERSION = eval $VERSION;
21 my @session_data_accessors; # used in delete_session
23 __PACKAGE__->mk_accessors(
24 "_session_delete_reason",
25 @session_data_accessors = qw/
29 _extended_session_expires
34 _tried_loading_session_id
35 _tried_loading_session_data
36 _tried_loading_session_expires
37 _tried_loading_flash_data
38 _needs_early_session_finalization
42 sub _session_plugin_config {
44 # FIXME - Start warning once all the state/store modules have also been updated.
45 #$c->log->warn("Deprecated 'session' config key used, please use the key 'Plugin::Session' instead")
46 # if exists $c->config->{session}
47 #$c->config->{'Plugin::Session'} ||= delete($c->config->{session}) || {};
48 $c->config->{'Plugin::Session'} ||= $c->config->{session} || {};
54 $c->maybe::next::method(@_);
56 $c->check_session_plugin_requirements;
62 sub check_session_plugin_requirements {
65 unless ( $c->isa("Catalyst::Plugin::Session::State")
66 && $c->isa("Catalyst::Plugin::Session::Store") )
69 ( "The Session plugin requires both Session::State "
70 . "and Session::Store plugins to be used as well." );
73 Catalyst::Exception->throw($err);
80 my $cfg = $c->_session_plugin_config;
85 verify_user_agent => 0,
86 expiry_threshold => 0,
90 $c->maybe::next::method();
96 $c->maybe::next::method(@_);
98 if ( $c->_session_plugin_config->{flash_to_stash}
100 and my $flash_data = $c->flash )
102 @{ $c->stash }{ keys %$flash_data } = values %$flash_data;
106 sub finalize_headers {
109 # fix cookie before we send headers
110 $c->_save_session_expires;
112 # Force extension of session_expires before finalizing headers, so a pos
113 # up to date. First call to session_expires will extend the expiry, subs
114 # just return the previously extended value.
116 $c->finalize_session if $c->_needs_early_session_finalization;
118 return $c->maybe::next::method(@_);
124 # We have to finalize our session *before* $c->engine->finalize_xxx is called,
125 # because we do not want to send the HTTP response before the session is stored/committed to
126 # the session database (or whatever Session::Store you use).
127 $c->finalize_session unless $c->_needs_early_session_finalization;
128 $c->_clear_session_instance_data;
130 return $c->maybe::next::method(@_);
133 sub finalize_session {
136 $c->maybe::next::method(@_);
138 $c->_save_session_id;
144 sub _session_updated {
147 if ( my $session_data = $c->_session ) {
149 no warnings 'uninitialized';
150 if ( Object::Signature::signature($session_data) ne
151 $c->_session_data_sig )
153 return $session_data;
165 sub _save_session_id {
168 # we already called set when allocating
169 # no need to tell the state plugins anything new
172 sub _save_session_expires {
175 if ( defined($c->_session_expires) ) {
177 if (my $sid = $c->sessionid) {
179 my $current = $c->_get_stored_session_expires;
180 my $extended = $c->session_expires;
181 if ($extended > $current) {
182 $c->store_session_data( "expires:$sid" => $extended );
192 if ( my $session_data = $c->_session_updated ) {
194 $session_data->{__updated} = time();
195 my $sid = $c->sessionid;
196 $c->store_session_data( "session:$sid" => $session_data );
203 if ( my $flash_data = $c->_flash ) {
205 my $hashes = $c->_flash_key_hashes || {};
206 my $keep = $c->_flash_keep_keys || {};
207 foreach my $key ( keys %$hashes ) {
208 if ( !exists $keep->{$key} and Object::Signature::signature( \$flash_data->{$key} ) eq $hashes->{$key} ) {
209 delete $flash_data->{$key};
213 my $sid = $c->sessionid;
215 my $session_data = $c->_session;
217 $session_data->{__flash} = $flash_data;
220 delete $session_data->{__flash};
222 $c->_session($session_data);
227 sub _load_session_expires {
229 return $c->_session_expires if $c->_tried_loading_session_expires;
230 $c->_tried_loading_session_expires(1);
232 if ( my $sid = $c->sessionid ) {
233 my $expires = $c->_get_stored_session_expires;
235 if ( $expires >= time() ) {
236 $c->_session_expires( $expires );
239 $c->delete_session( "session expired" );
249 return $c->_session if $c->_tried_loading_session_data;
250 $c->_tried_loading_session_data(1);
252 if ( my $sid = $c->sessionid ) {
253 if ( $c->_load_session_expires ) { # > 0
255 my $session_data = $c->get_session_data("session:$sid") || return;
256 $c->_session($session_data);
258 no warnings 'uninitialized'; # ne __address
259 if ( $c->_session_plugin_config->{verify_address}
260 && exists $session_data->{__address}
261 && $session_data->{__address} ne $c->request->address )
264 "Deleting session $sid due to address mismatch ("
265 . $session_data->{__address} . " != "
266 . $c->request->address . ")"
268 $c->delete_session("address mismatch");
271 if ( $c->_session_plugin_config->{verify_user_agent}
272 && $session_data->{__user_agent} ne $c->request->user_agent )
275 "Deleting session $sid due to user agent mismatch ("
276 . $session_data->{__user_agent} . " != "
277 . $c->request->user_agent . ")"
279 $c->delete_session("user agent mismatch");
283 $c->log->debug(qq/Restored session "$sid"/) if $c->debug;
284 $c->_session_data_sig( Object::Signature::signature($session_data) ) if $session_data;
285 $c->_expire_session_keys;
287 return $session_data;
296 return $c->_flash if $c->_tried_loading_flash_data;
297 $c->_tried_loading_flash_data(1);
299 if ( my $sid = $c->sessionid ) {
301 my $session_data = $c->session;
302 $c->_flash($session_data->{__flash});
304 if ( my $flash_data = $c->_flash )
306 $c->_flash_key_hashes({ map { $_ => Object::Signature::signature( \$flash_data->{$_} ) } keys %$flash_data });
315 sub _expire_session_keys {
316 my ( $c, $data ) = @_;
320 my $expire_times = ( $data || $c->_session || {} )->{__expire_keys} || {};
321 foreach my $key ( grep { $expire_times->{$_} < $now } keys %$expire_times ) {
322 delete $c->_session->{$key};
323 delete $expire_times->{$key};
327 sub _clear_session_instance_data {
329 $c->$_(undef) for @session_data_accessors;
330 $c->maybe::next::method(@_); # allow other plugins to hook in on this
333 sub change_session_id {
336 my $sessiondata = $c->session;
337 my $oldsid = $c->sessionid;
338 my $newsid = $c->create_session_id;
341 $c->log->debug(qq/change_sessid: deleting session data from "$oldsid"/) if $c->debug;
342 $c->delete_session_data("${_}:${oldsid}") for qw/session expires flash/;
345 $c->log->debug(qq/change_sessid: storing session data to "$newsid"/) if $c->debug;
346 $c->store_session_data( "session:$newsid" => $sessiondata );
352 my ( $c, $msg ) = @_;
354 $c->log->debug("Deleting session" . ( defined($msg) ? "($msg)" : '(no reason given)') ) if $c->debug;
356 # delete the session data
357 if ( my $sid = $c->sessionid ) {
358 $c->delete_session_data("${_}:${sid}") for qw/session expires flash/;
359 $c->delete_session_id($sid);
362 # reset the values in the context object
363 # see the BEGIN block
364 $c->_clear_session_instance_data;
366 $c->_session_delete_reason($msg);
369 sub session_delete_reason {
372 $c->session_is_valid; # check that it was loaded
374 $c->_session_delete_reason(@_);
377 sub session_expires {
380 if ( defined( my $expires = $c->_extended_session_expires ) ) {
382 } elsif ( defined( $expires = $c->_load_session_expires ) ) {
383 return $c->extend_session_expires( $expires );
389 sub extend_session_expires {
390 my ( $c, $expires ) = @_;
392 my $threshold = $c->_session_plugin_config->{expiry_threshold} || 0;
394 if ( my $sid = $c->sessionid ) {
395 my $expires = $c->_get_stored_session_expires;
396 my $cutoff = $expires - $threshold;
398 if (!$threshold || $cutoff <= time || $c->_session_updated) {
400 $c->_extended_session_expires( my $updated = $c->calculate_initial_session_expires() );
401 $c->extend_session_id( $sid, $updated );
419 sub change_session_expires {
420 my ( $c, $expires ) = @_;
423 my $sid = $c->sessionid;
424 my $time_exp = time() + $expires;
425 $c->store_session_data( "expires:$sid" => $time_exp );
428 sub _get_stored_session_expires {
431 if ( my $sid = $c->sessionid ) {
432 return $c->get_session_data("expires:$sid") || 0;
438 sub initial_session_expires {
440 return ( time() + $c->_session_plugin_config->{expires} );
443 sub calculate_initial_session_expires {
445 return max( $c->initial_session_expires, $c->_get_stored_session_expires );
448 sub calculate_extended_session_expires {
449 my ( $c, $prev ) = @_;
450 return ( time() + $prev );
453 sub reset_session_expires {
454 my ( $c, $sid ) = @_;
456 my $exp = $c->calculate_initial_session_expires;
457 $c->_session_expires( $exp );
459 # since we're setting _session_expires directly, make load_session_expires
460 # actually use that value.
462 $c->_tried_loading_session_expires(1);
463 $c->_extended_session_expires( $exp );
470 return $c->_sessionid || $c->_load_sessionid;
473 sub _load_sessionid {
475 return if $c->_tried_loading_session_id;
476 $c->_tried_loading_session_id(1);
478 if ( defined( my $sid = $c->get_session_id ) ) {
479 if ( $c->validate_session_id($sid) ) {
480 # temporarily set the inner key, so that validation will work
481 $c->_sessionid($sid);
484 $sid = HTML::Entities::encode_entities($sid);
485 my $err = "Tried to set invalid session ID '$sid'";
486 $c->log->error($err);
487 Catalyst::Exception->throw($err);
494 sub session_is_valid {
497 # force a check for expiry, but also __address, etc
498 if ( $c->_load_session ) {
505 sub validate_session_id {
506 my ( $c, $sid ) = @_;
508 $sid and $sid =~ /^[a-f\d]+$/i;
514 my $session = $c->_session || $c->_load_session || do {
515 $c->create_session_id_if_needed;
516 $c->initialize_session_data;
520 my $new_values = @_ > 1 ? { @_ } : $_[0];
521 croak('session takes a hash or hashref') unless ref $new_values;
523 for my $key (keys %$new_values) {
524 $session->{$key} = $new_values->{$key};
532 my ( $c, @keys ) = @_;
533 my $href = $c->_flash_keep_keys || $c->_flash_keep_keys({});
534 (@{$href}{@keys}) = ((undef) x @keys);
539 $c->_flash || $c->_load_flash || do {
540 $c->create_session_id_if_needed;
548 my $items = @_ > 1 ? {@_} : $_[0];
549 croak('flash takes a hash or hashref') unless ref $items;
550 @{ $c->_flash }{ keys %$items } = values %$items;
564 #$c->delete_session_data("flash:" . $c->sessionid); # should this be in here? or delayed till finalization?
565 $c->_flash_key_hashes({});
566 $c->_flash_keep_keys({});
570 sub session_expire_key {
571 my ( $c, %keys ) = @_;
574 @{ $c->session->{__expire_keys} }{ keys %keys } =
575 map { $now + $_ } values %keys;
578 sub initialize_session_data {
589 $c->_session_plugin_config->{verify_address}
590 ? ( __address => $c->request->address||'' )
594 $c->_session_plugin_config->{verify_user_agent}
595 ? ( __user_agent => $c->request->user_agent||'' )
602 sub generate_session_id {
605 my $digest = $c->_find_digest();
606 $digest->add( $c->session_hash_seed() );
607 return $digest->hexdigest;
610 sub create_session_id_if_needed {
612 $c->create_session_id unless $c->sessionid;
615 sub create_session_id {
618 my $sid = $c->generate_session_id;
620 $c->log->debug(qq/Created session "$sid"/) if $c->debug;
622 $c->_sessionid($sid);
623 $c->reset_session_expires;
624 $c->set_session_id($sid);
631 sub session_hash_seed {
634 return join( "", ++$counter, time, rand, $$, {}, overload::StrVal($c), );
639 sub _find_digest () {
641 foreach my $alg (qw/SHA-1 SHA-256 MD5/) {
642 if ( eval { Digest->new($alg) } ) {
647 Catalyst::Exception->throw(
648 "Could not find a suitable Digest module. Please install "
649 . "Digest::SHA1, Digest::SHA, or Digest::MD5" )
653 return Digest->new($usable);
660 $c->maybe::next::method(),
663 ? ( [ "Session ID" => $c->sessionid ], [ Session => $c->session ], )
669 sub get_session_id { shift->maybe::next::method(@_) }
670 sub set_session_id { shift->maybe::next::method(@_) }
671 sub delete_session_id { shift->maybe::next::method(@_) }
672 sub extend_session_id { shift->maybe::next::method(@_) }
682 Catalyst::Plugin::Session - Generic Session plugin - ties together server side storage and client side state required to maintain session data.
686 # To get sessions to "just work", all you need to do is use these plugins:
690 Session::Store::FastMmap
691 Session::State::Cookie
694 # you can replace Store::FastMmap with Store::File - both have sensible
695 # default configurations (see their docs for details)
697 # more complicated backends are available for other scenarios (DBI storage,
701 # after you've loaded the plugins you can save session data
702 # For example, if you are writing a shopping cart, it could be implemented
705 sub add_item : Local {
706 my ( $self, $c ) = @_;
708 my $item_id = $c->req->param("item");
710 # $c->session is a hash ref, a bit like $c->stash
711 # the difference is that it' preserved across requests
713 push @{ $c->session->{items} }, $item_id;
715 $c->forward("MyView");
718 sub display_items : Local {
719 my ( $self, $c ) = @_;
721 # values in $c->session are restored
722 $c->stash->{items_to_display} =
723 [ map { MyModel->retrieve($_) } @{ $c->session->{items} } ];
725 $c->forward("MyView");
730 The Session plugin is the base of two related parts of functionality required
731 for session management in web applications.
733 The first part, the State, is getting the browser to repeat back a session key,
734 so that the web application can identify the client and logically string
735 several requests together into a session.
737 The second part, the Store, deals with the actual storage of information about
738 the client. This data is stored so that the it may be revived for every request
739 made by the same client.
741 This plugin links the two pieces together.
743 =head1 RECOMENDED BACKENDS
747 =item Session::State::Cookie
749 The only really sane way to do state is using cookies.
751 =item Session::Store::File
753 A portable backend, based on Cache::File.
755 =item Session::Store::FastMmap
757 A fast and flexible backend, based on Cache::FastMmap.
767 An accessor for the session ID value.
771 Returns a hash reference that might contain unserialized values from previous
772 requests in the same session, and whose modified value will be saved for future
775 This method will automatically create a new session and session ID if none
778 You can also set session keys by passing a list of key/value pairs or a
781 $c->session->{foo} = "bar"; # This works.
782 $c->session(one => 1, two => 2); # And this.
783 $c->session({ answer => 42 }); # And this.
785 =item session_expires
787 This method returns the time when the current session will expire, or 0 if
788 there is no current session. If there is a session and it already expired, it
789 will delete the session and return 0 as well.
793 This is like Ruby on Rails' flash data structure. Think of it as a stash that
794 lasts for longer than one request, letting you redirect instead of forward.
796 The flash data will be cleaned up only on requests on which actually use
797 $c->flash (thus allowing multiple redirections), and the policy is to delete
798 all the keys which haven't changed since the flash data was loaded at the end
801 Note that use of the flash is an easy way to get data across requests, but
802 it's also strongly disrecommended, due it it being inherently plagued with
803 race conditions. This means that it's unlikely to work well if your
804 users have multiple tabs open at once, or if your site does a lot of AJAX
807 L<Catalyst::Plugin::StatusMessage> is the recommended alternative solution,
808 as this doesn't suffer from these issues.
811 my ( $self, $c ) = @_;
813 $c->flash->{beans} = 10;
814 $c->response->redirect( $c->uri_for("foo") );
818 my ( $self, $c ) = @_;
820 my $value = $c->flash->{beans};
824 $c->response->redirect( $c->uri_for("bar") );
828 my ( $self, $c ) = @_;
830 if ( exists $c->flash->{beans} ) { # false
837 Zap all the keys in the flash regardless of their current state.
839 =item keep_flash @keys
841 If you want to keep a flash key for the next request too, even if it hasn't
842 changed, call C<keep_flash> and pass in the keys as arguments.
844 =item delete_session REASON
846 This method is used to invalidate a session. It takes an optional parameter
847 which will be saved in C<session_delete_reason> if provided.
849 NOTE: This method will B<also> delete your flash data.
851 =item session_delete_reason
853 This accessor contains a string with the reason a session was deleted. Possible
868 =item session_expire_key $key, $ttl
870 Mark a key to expire at a certain time (only useful when shorter than the
871 expiry time for the whole session).
875 __PACKAGE__->config('Plugin::Session' => { expires => 10000000000 }); # "forever"
876 (NB If this number is too large, Y2K38 breakage could result.)
880 $c->session_expire_key( __user => 3600 );
882 Will make the session data survive, but the user will still be logged out after
885 Note that these values are not auto extended.
887 =item change_session_id
889 By calling this method you can force a session id change while keeping all
890 session data. This method might come handy when you are paranoid about some
891 advanced variations of session fixation attack.
893 If you want to prevent this session fixation scenario:
895 0) let us have WebApp with anonymous and authenticated parts
896 1) a hacker goes to vulnerable WebApp and gets a real sessionid,
897 just by browsing anonymous part of WebApp
898 2) the hacker inserts (somehow) this values into a cookie in victim's browser
899 3) after the victim logs into WebApp the hacker can enter his/her session
901 you should call change_session_id in your login controller like this:
903 if ($c->authenticate( { username => $user, password => $pass } )) {
905 $c->change_session_id;
912 =item change_session_expires $expires
914 You can change the session expiration time for this session;
916 $c->change_session_expires( 4000 );
918 Note that this only works to set the session longer than the config setting.
922 =head1 INTERNAL METHODS
928 This method is extended to also make calls to
929 C<check_session_plugin_requirements> and C<setup_session>.
931 =item check_session_plugin_requirements
933 This method ensures that a State and a Store plugin are also in use by the
938 This method populates C<< $c->config('Plugin::Session') >> with the default values
939 listed in L</CONFIGURATION>.
943 This method is extended.
945 Its only effect is if the (off by default) C<flash_to_stash> configuration
946 parameter is on - then it will copy the contents of the flash to the stash at
949 =item finalize_headers
951 This method is extended and will extend the expiry time before sending
956 This method is extended and will call finalize_session before the other
957 finalize_body methods run. Here we persist the session data if a session exists.
959 =item initialize_session_data
961 This method will initialize the internal structure of the session, and is
962 called by the C<session> method if appropriate.
964 =item create_session_id
966 Creates a new session ID using C<generate_session_id> if there is no session ID
969 =item validate_session_id SID
971 Make sure a session ID is of the right format.
973 This currently ensures that the session ID string is any amount of case
974 insensitive hexadecimal characters.
976 =item generate_session_id
978 This method will return a string that can be used as a session ID. It is
979 supposed to be a reasonably random string with enough bits to prevent
980 collision. It basically takes C<session_hash_seed> and hashes it using SHA-1,
981 MD5 or SHA-256, depending on the availability of these modules.
983 =item session_hash_seed
985 This method is actually rather internal to generate_session_id, but should be
986 overridable in case you want to provide more random data.
988 Currently it returns a concatenated string which contains:
994 =item * The current time
996 =item * One value from C<rand>.
998 =item * The stringified value of a newly allocated hash reference
1000 =item * The stringified value of the Catalyst context object
1004 in the hopes that those combined values are entropic enough for most uses. If
1005 this is not the case you can replace C<session_hash_seed> with e.g.
1007 sub session_hash_seed {
1008 open my $fh, "<", "/dev/random";
1009 read $fh, my $bytes, 20;
1014 Or even more directly, replace C<generate_session_id>:
1016 sub generate_session_id {
1017 open my $fh, "<", "/dev/random";
1018 read $fh, my $bytes, 20;
1020 return unpack("H*", $bytes);
1023 Also have a look at L<Crypt::Random> and the various openssl bindings - these
1024 modules provide APIs for cryptographically secure random data.
1026 =item finalize_session
1028 Clean up the session during C<finalize>.
1030 This clears the various accessors after saving to the store.
1034 See L<Catalyst/dump_these> - ammends the session data structure to the list of
1035 dumped objects if session ID is defined.
1038 =item calculate_extended_session_expires
1040 =item calculate_initial_session_expires
1042 =item create_session_id_if_needed
1044 =item delete_session_id
1046 =item extend_session_expires
1048 Note: this is *not* used to give an individual user a longer session. See
1049 'change_session_expires'.
1051 =item extend_session_id
1053 =item get_session_id
1055 =item reset_session_expires
1057 =item session_is_valid
1059 =item set_session_id
1061 =item initial_session_expires
1065 =head1 USING SESSIONS DURING PREPARE
1067 The earliest point in time at which you may use the session data is after
1068 L<Catalyst::Plugin::Session>'s C<prepare_action> has finished.
1070 State plugins must set $c->session ID before C<prepare_action>, and during
1071 C<prepare_action> L<Catalyst::Plugin::Session> will actually load the data from
1074 sub prepare_action {
1077 # don't touch $c->session yet!
1079 $c->NEXT::prepare_action( @_ );
1081 $c->session; # this is OK
1082 $c->sessionid; # this is also OK
1085 =head1 CONFIGURATION
1087 $c->config('Plugin::Session' => {
1091 All configuation parameters are provided in a hash reference under the
1092 C<Plugin::Session> key in the configuration hash.
1098 The time-to-live of each session, expressed in seconds. Defaults to 7200 (two
1101 =item expiry_threshold
1103 Only update the session expiry time if it would otherwise expire
1104 within this many seconds from now.
1106 The purpose of this is to keep the session store from being updated
1107 when nothing else in the session is updated.
1109 Defaults to 0 (in which case, the expiration will always be updated).
1111 =item verify_address
1113 When true, C<< $c->request->address >> will be checked at prepare time. If it is
1114 not the same as the address that initiated the session, the session is deleted.
1118 =item verify_user_agent
1120 When true, C<< $c->request->user_agent >> will be checked at prepare time. If it
1121 is not the same as the user agent that initiated the session, the session is
1126 =item flash_to_stash
1128 This option makes it easier to have actions behave the same whether they were
1129 forwarded to or redirected to. On prepare time it copies the contents of
1130 C<flash> (if any) to the stash.
1136 The hash reference returned by C<< $c->session >> contains several keys which
1137 are automatically set:
1143 This key no longer exists. Use C<session_expires> instead.
1147 The last time a session was saved to the store.
1151 The time when the session was first created.
1155 The value of C<< $c->request->address >> at the time the session was created.
1156 This value is only populated if C<verify_address> is true in the configuration.
1160 The value of C<< $c->request->user_agent >> at the time the session was created.
1161 This value is only populated if C<verify_user_agent> is true in the configuration.
1167 =head2 Round the Robin Proxies
1169 C<verify_address> could make your site inaccessible to users who are behind
1170 load balanced proxies. Some ISPs may give a different IP to each request by the
1171 same client due to this type of proxying. If addresses are verified these
1172 users' sessions cannot persist.
1174 To let these users access your site you can either disable address verification
1175 as a whole, or provide a checkbox in the login dialog that tells the server
1176 that it's OK for the address of the client to change. When the server sees that
1177 this box is checked it should delete the C<__address> special key from the
1178 session hash when the hash is first created.
1180 =head2 Race Conditions
1182 In this day and age where cleaning detergents and Dutch football (not the
1183 American kind) teams roam the plains in great numbers, requests may happen
1184 simultaneously. This means that there is some risk of session data being
1185 overwritten, like this:
1191 request a starts, request b starts, with the same session ID
1195 session data is loaded in request a
1199 session data is loaded in request b
1203 session data is changed in request a
1207 request a finishes, session data is updated and written to store
1211 request b finishes, session data is updated and written to store, overwriting
1212 changes by request a
1216 For applications where any given user's session is only making one request
1217 at a time this plugin should be safe enough.
1225 Yuval Kogman, C<nothingmuch@woobling.org>
1229 Tomas Doran (t0m) C<bobtfish@bobtfish.net> (current maintainer)
1235 Florian Ragwitz (rafl) C<rafl@debian.org>
1237 Kent Fredric (kentnl)
1239 And countless other contributers from #catalyst. Thanks guys!
1243 Devin Austin (dhoss) <dhoss@cpan.org>
1245 Robert Rothenberg <rrwo@cpan.org> (on behalf of Foxtons Ltd.)
1247 =head1 COPYRIGHT & LICENSE
1249 Copyright (c) 2005 the aforementioned authors. All rights
1250 reserved. This program is free software; you can redistribute
1251 it and/or modify it under the same terms as Perl itself.