From 6613992f3d13e58b65fa5a4b27607814334fbaf3 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 8 Jun 2004 18:37:11 +0000 Subject: [PATCH] removed the need for Data::Serializer --- docs/changelog/6.x.x.txt | 1 + docs/gotcha.txt | 2 ++ docs/install.txt | 3 +-- lib/WebGUI/Cache.pm | 44 ---------------------------------------- lib/WebGUI/Page.pm | 1 - sbin/preload.perl | 1 - 6 files changed, 4 insertions(+), 48 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 024212738..affbb8284 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -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 diff --git a/docs/gotcha.txt b/docs/gotcha.txt index d2958210e..ed52b3b21 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -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 -------------------------------------------------------------------- diff --git a/docs/install.txt b/docs/install.txt index 8fd2662eb..a31cca634 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -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. diff --git a/lib/WebGUI/Cache.pm b/lib/WebGUI/Cache.pm index 10c4d21f2..56546c530 100644 --- a/lib/WebGUI/Cache.pm +++ b/lib/WebGUI/Cache.pm @@ -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); -} #------------------------------------------------------------------- diff --git a/lib/WebGUI/Page.pm b/lib/WebGUI/Page.pm index f0491aba6..40d8cfdfa 100644 --- a/lib/WebGUI/Page.pm +++ b/lib/WebGUI/Page.pm @@ -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); diff --git a/sbin/preload.perl b/sbin/preload.perl index aa39b223d..80f9f11ba 100644 --- a/sbin/preload.perl +++ b/sbin/preload.perl @@ -29,7 +29,6 @@ use FileHandle (); use Net::SMTP (); use POSIX (); use URI::Escape (); -use Data::Serializer (); use SOAP::Lite ();