removed the need for Data::Serializer
This commit is contained in:
parent
88b421853c
commit
6613992f3d
6 changed files with 4 additions and 48 deletions
|
|
@ -10,6 +10,7 @@
|
|||
- Fixed a bug in articles where articles with no content would fail to
|
||||
display their images.
|
||||
- bugfix [966466] WebGUI::Session. System crash when user language setting missing.
|
||||
- Eliminated the need for Data::Serializer.
|
||||
|
||||
|
||||
6.0.3
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ save you many hours of grief.
|
|||
--------------------------------------------------------------------
|
||||
* See docs/migration.txt for changes in plug-in coding.
|
||||
|
||||
* You no longer need Data::Serializer.
|
||||
|
||||
|
||||
6.0.2
|
||||
--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -24,9 +24,8 @@ QnD INSTALL INSTRUCTIONS:
|
|||
Compress::Zlib
|
||||
IO::Zlib
|
||||
SOAP::Lite
|
||||
Data::Serializer
|
||||
Image::Magick (optional)
|
||||
Cache::Cache
|
||||
Image::Magick (optional)
|
||||
|
||||
|
||||
3. Install Apache (preferably with mod_perl) and set up your config.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ use HTTP::Request;
|
|||
use LWP::UserAgent;
|
||||
use WebGUI::ErrorHandler;
|
||||
use WebGUI::Session;
|
||||
use Data::Serializer;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -97,20 +96,6 @@ sub get {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getDataStructure ( )
|
||||
|
||||
Retrieves an datastructure from the filesystem cache.
|
||||
|
||||
=cut
|
||||
|
||||
sub getDataStructure {
|
||||
my ($serializer);
|
||||
$serializer = Data::Serializer->new(serializer => 'Storable');
|
||||
return $serializer->deserialize($_[0]->{_cache}->get($_[0]->{_key}));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 new ( key [, namespace ] )
|
||||
|
||||
Constructor.
|
||||
|
|
@ -164,35 +149,6 @@ sub set {
|
|||
$_[0]->{_cache}->set($_[0]->{_key},$_[1],$ttl);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setDataStructure ( content [, ttl ] )
|
||||
|
||||
Saves a (complex) datastructure to the filesystem cache. This is the way to go is you want to cache
|
||||
something other then a scalar. You can put any hash, array or object in here. You can also cache a scalar
|
||||
with this method but if you only need to cache a scalar, though, it's better to use set because set saves
|
||||
diskspace, memory and processing time.
|
||||
|
||||
=over
|
||||
|
||||
=item content
|
||||
|
||||
A reference to whatever data structure you want to cache.
|
||||
|
||||
=item ttl
|
||||
|
||||
The time to live for this data structure. This is the amount of time (in seconds) that the structure will remain
|
||||
in the cache. Defaults to "60".
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub setDataStructure {
|
||||
my $ttl = $_[2] || 60;
|
||||
$serializer = Data::Serializer->new(serializer => 'Storable');
|
||||
$_[0]->{_cache}->set($_[0]->{_key},$serializer->serialize($_[1]),$ttl);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ use WebGUI::SQL;
|
|||
use WebGUI::Template;
|
||||
use WebGUI::Utility;
|
||||
use WebGUI::DateTime;
|
||||
use Data::Serializer;
|
||||
|
||||
our @ISA = qw(WebGUI::Persistent::Tree);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ use FileHandle ();
|
|||
use Net::SMTP ();
|
||||
use POSIX ();
|
||||
use URI::Escape ();
|
||||
use Data::Serializer ();
|
||||
use SOAP::Lite ();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue