Business-Cart-Generic
view release on metacpan or search on metacpan
lib/Business/Cart/Generic/Database/Loader.pm view on Meta::CPAN
package Business::Cart::Generic::Database::Loader;
use strict;
use warnings;
use CGI;
use FindBin;
use Business::Cart::Generic::Database;
use IO::File;
use Moose;
use Perl6::Slurp;
use Text::CSV_XS;
use Text::Xslate;
use Try::Tiny;
extends 'Business::Cart::Generic::Database::Base';
use namespace::autoclean;
our $VERSION = '0.85';
# -----------------------------------------------
sub BUILD
{
my($self) = @_;
$self -> db
(
Business::Cart::Generic::Database -> new
(
online => 0,
query => CGI -> new,
)
);
} # End of BUILD.
# -----------------------------------------------
sub generate_description
{
my($self, $name, $type, $style, $color, $class, $size) = @_;
if ($name eq '-')
{
$name = $type;
}
else
{
$name .= ' - ' . $type;
}
my(@description);
if ($style ne '-')
{
push @description, $style;
}
if ($color ne '-')
{
push @description, $color;
}
if ($class ne '-')
{
push @description, $class;
}
if ($size ne '-')
{
push @description, $size;
}
( run in 1.740 second using v1.01-cache-2.11-cpan-99c4e6809bf )