Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
share
/
doc
/
perl-DBIx-Class
/
t
/
schema
Upload
4 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
anon.t
274 B
-rw-r--r--
2020-03-29 18:33:33
Edit
Del
clone.t
565 B
-rw-r--r--
2020-03-29 18:33:33
Edit
Del
Editing: clone.t
(565 B)
Path: /usr/share/doc/perl-DBIx-Class/t/schema/clone.t
Back
use strict; use warnings; use Test::More; use lib qw(t/lib); use DBICTest; my $schema = DBICTest->init_schema(); { my $clone = $schema->clone; cmp_ok ($clone->storage, 'eq', $schema->storage, 'Storage copied into new schema (not a new instance)'); } { is $schema->custom_attr, undef; my $clone = $schema->clone(custom_attr => 'moo'); is $clone->custom_attr, 'moo', 'cloning can change existing attrs'; } { my $clone = $schema->clone({ custom_attr => 'moo' }); is $clone->custom_attr, 'moo', 'cloning can change existing attrs'; } done_testing;