Tatsuki SUGIURA
sugi****@users*****
2006年 7月 12日 (水) 20:41:40 JST
Index: slashjp/Slash/Test/Test.pm diff -u slashjp/Slash/Test/Test.pm:1.3 slashjp/Slash/Test/Test.pm:1.4 --- slashjp/Slash/Test/Test.pm:1.3 Fri Dec 31 21:35:47 2004 +++ slashjp/Slash/Test/Test.pm Wed Jul 12 20:41:40 2006 @@ -1,7 +1,7 @@ # This code is a part of Slash, and is released under the GPL. -# Copyright 1997-2004 by Open Source Development Network. See README +# Copyright 1997-2005 by Open Source Technology Group. See README # and COPYING for more information, or see http://slashcode.com/. -# $Id: Test.pm,v 1.3 2004/12/31 12:35:47 oliver Exp $ +# $Id: Test.pm,v 1.4 2006/07/12 11:41:40 sugi Exp $ package Slash::Test; @@ -56,7 +56,13 @@ Will export everything from Slash, Slash::Utility, Slash::Display, Slash::Constants, Slash::XML, and Data::Dumper into the current namespace. Will export $user, $anon, $form, $constants, $slashdb, and $gSkin as global -variables into the current namespace. +variables into the current namespace, along with a few other useful +variables: $self (alias to $slashdb), $reader_db, $log_db, $writer_db, +and $search_db. + +Also the name of each plugin will be a global variable referencing its +object (e.g., C<$journal> is automatically created as a L<Slash::Journal> +object). So use it one of three ways (use the default Virtual User, or pass it in via the import list, or pass in with slashTest()), and then @@ -94,7 +100,7 @@ use base 'Exporter'; use vars qw($VERSION @EXPORT); -($VERSION) = ' $Revision: 1.3 $ ' =~ /\$Revision:\s+([^\s]+)/; +($VERSION) = ' $Revision: 1.4 $ ' =~ /\$Revision:\s+([^\s]+)/; @EXPORT = ( @Slash::EXPORT, @Slash::Constants::EXPORT_OK, @@ -146,7 +152,8 @@ =item Side effects Set up the environment with createEnvironment(), export $user, $anon, -$form, $constants, $slashdb, and $gSkin into current namespace. +$form, $constants, $slashdb, and $gSkin into current namespace. $self +is an alias to $slashdb. =back @@ -163,7 +170,7 @@ setCurrentSkin(determineCurrentSkin()); - $::slashdb = getCurrentDB(); + $::self = $::slashdb = getCurrentDB(); $::constants = getCurrentStatic(); $::user = getCurrentUser(); $::anon = getCurrentAnonymousCoward(); @@ -279,4 +286,4 @@ =head1 VERSION -$Id: Test.pm,v 1.3 2004/12/31 12:35:47 oliver Exp $ +$Id: Test.pm,v 1.4 2006/07/12 11:41:40 sugi Exp $