[Rt-commit] [svn] r1894 - in rt/branches/3.3-TESTING: . sbin
autrijus at pallas.eruditorum.org
autrijus at pallas.eruditorum.org
Sun Nov 14 12:11:20 EST 2004
Author: autrijus
Date: Sun Nov 14 12:11:20 2004
New Revision: 1894
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/sbin/factory
Log:
r4106 at not: autrijus | 2004-11-14T17:12:19.553522Z
* Make sbin/factory safe from strict and warnings.
Modified: rt/branches/3.3-TESTING/sbin/factory
==============================================================================
--- rt/branches/3.3-TESTING/sbin/factory (original)
+++ rt/branches/3.3-TESTING/sbin/factory Sun Nov 14 12:11:20 2004
@@ -44,6 +44,7 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
+use strict;
use DBI;
my $database = shift;
@@ -147,6 +148,7 @@
$tablemap{'CreatedBy'} = 'User';
$tablemap{'UpdatedBy'} = 'User';
+my %typemap;
$typemap{'id'} = 'ro';
$typemap{'Creator'} = 'auto';
$typemap{'Created'} = 'auto';
@@ -183,18 +185,20 @@
my $ClassAccessible = "";
my $FieldsPod = "";
my $CreatePod = "";
+ my $RecordInit = "";
my %fields;
- $introspection = $dbh->prepare("SELECT * from $table where id is null");
+ my $introspection = $dbh->prepare("SELECT * from $table where id is null");
$introspection->execute();
my @names =@{ $introspection->{'NAME'}};
my @types = @{$introspection->{'TYPE'}};
my @is_blob = @{$introspection->{'mysql_is_blob'}};
my @is_num = @{$introspection->{'mysql_is_num'}};
- my %sqltypes = {};
- my %numeric = {};
+ my %blobness = ();
+ my %sqltypes = ();
+ my %numeric = ();
foreach my $name (@names) {
$sqltypes{$name} = shift @types;
$blobness{$name} = (shift @is_blob || "0");
@@ -217,6 +221,8 @@
#generate the 'accessible' datastructure
+ no warnings 'uninitialized';
+
if ( $typemap{$field} eq 'auto' ) {
$ClassAccessible .= " $field =>
{read => 1, auto => 1,";
@@ -297,7 +303,7 @@
}
- $Create = "
+ my $Create = "
sub Create {
my \$self = shift;
my \%args = (
More information about the Rt-commit
mailing list