Permalink
Browse files

Fixes for latest role attribute visibility.

  • Loading branch information...
1 parent 74f9839 commit f3f9afc426c8941dee8e65c02e03e446bb2a57d1 @jnthn jnthn committed Jan 22, 2012
Showing with 16 additions and 14 deletions.
  1. +2 −0 lib/MiniDBD.pm6
  2. +14 −14 lib/MiniDBD/mysql.pm6
View
@@ -27,6 +27,7 @@ message retrieved from the database driver. It is cleared (when?).
=end pod
has $!errstr;
+ method !errstr() is rw { $!errstr }
=begin pod
=head5 $.PrintError
@@ -65,6 +66,7 @@ message retrieved from the database driver. It is cleared (when?).
=end pod
has $!errstr;
+ method !errstr() is rw { $!errstr }
=begin pod
=head4 methods
View
@@ -139,10 +139,10 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
$!result_set = Mu;
my $status = mysql_query( $!mysql_client, $statement ); # 0 means OK
$.mysql_warning_count = mysql_warning_count( $!mysql_client );
- $!errstr = Mu;
+ self!errstr = Mu;
if $status != 0 {
- $!errstr = mysql_error( $!mysql_client );
- if $!RaiseError { die $!errstr; }
+ self!errstr = mysql_error( $!mysql_client );
+ if $!RaiseError { die self!errstr; }
}
my $rows = self.rows;
@@ -153,11 +153,11 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
# rows() is called on the statement handle $sth.
method rows() {
unless defined $!affected_rows {
- $!errstr = Mu;
+ self!errstr = Mu;
$!affected_rows = mysql_affected_rows($!mysql_client);
my $errstr = mysql_error( $!mysql_client );
- if $errstr ne '' { $!errstr = $errstr; }
+ if $errstr ne '' { self!errstr = $errstr; }
}
if defined $!affected_rows {
@@ -175,12 +175,12 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
if defined $!result_set {
# warn "fetching a row";
- $!errstr = Mu;
+ self!errstr = Mu;
my $native_row = mysql_fetch_row($!result_set); # can return NULL
my $errstr = mysql_error( $!mysql_client );
- if $errstr ne '' { $!errstr = $errstr; }
+ if $errstr ne '' { self!errstr = $errstr; }
if $native_row {
loop ( my $i=0; $i < $!field_count; $i++ ) {
@@ -200,10 +200,10 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
}
if defined $!result_set {
# warn "fetching a row";
- $!errstr = Mu;
+ self!errstr = Mu;
my $native_row = mysql_fetch_row($!result_set); # can return NULL
my $errstr = mysql_error( $!mysql_client );
- if $errstr ne '' { $!errstr = $errstr; }
+ if $errstr ne '' { self!errstr = $errstr; }
if $native_row {
my @row_array;
loop ( my $i=0; $i < $!field_count; $i++ ) {
@@ -223,12 +223,12 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
$!field_count = mysql_field_count($!mysql_client);
}
if defined $!result_set {
- $!errstr = Mu;
+ self!errstr = Mu;
my @all_array;
- while ! $!errstr && my $native_row = mysql_fetch_row($!result_set) { # can return NULL
+ while ! self!errstr && my $native_row = mysql_fetch_row($!result_set) { # can return NULL
my $row_arrayref;
my $errstr = mysql_error( $!mysql_client );
- if $errstr ne '' { $!errstr = $errstr; }
+ if $errstr ne '' { self!errstr = $errstr; }
if $native_row {
my @row_array;
loop ( my $i=0; $i < $!field_count; $i++ ) {
@@ -254,9 +254,9 @@ class MiniDBD::mysql::StatementHandle does MiniDBD::StatementHandle {
}
if defined $!result_set {
- $!errstr = Mu;
+ self!errstr = Mu;
my $errstr = mysql_error( $!mysql_client );
- if $errstr ne '' { $!errstr = $errstr; }
+ if $errstr ne '' { self!errstr = $errstr; }
my $native_row = mysql_fetch_row($!result_set); # can return NULL

0 comments on commit f3f9afc

Please sign in to comment.