# Copyright (c) 1999 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: BLOB.pm,v 2.3 2008/09/10 16:54:29 nagler Exp $ package Bivio::Type::BLOB; use strict; use Bivio::Base 'Bivio.Type'; our($VERSION) = sprintf('%d.%02d', q$Revision: 2.3 $ =~ /\d+/g); sub from_literal { return defined($_[1]) ? \$_[1] : undef; } sub from_sql_column { return defined($_[1]) ? \$_[1] : undef; } sub to_literal { my(undef, $value) = @_; return ref($value) && defined($$value) ? $$value : ''; } sub to_query { die("can't convert a blob to a query"); } sub to_uri { die("can't convert a blob to a uri"); } 1;