Lines Matching refs:blessed
97 that is being blessed as our object:
108 Once we've blessed the hash referred to by C<$self> we can start
145 use Scalar::Util 'blessed';
151 print blessed( $bar ) // 'not blessed'; # prints "Class"
154 print blessed( $bar ) // 'not blessed'; # prints "not blessed"
159 reference. That's why the second call to C<blessed( $bar )> returns
164 reference" or describe an object as a "blessed reference", but this is
165 incorrect. It isn't the reference that is blessed as an object; it's
253 looks for the method in the package that the object has been blessed
365 blessed into the C<C> class, the C<speak()> method in the C<B> class
764 =head2 C<bless>, C<blessed>, and C<ref>
767 blessed into a class via the C<bless> function. The C<bless> function
773 In the first form, the anonymous hash is being blessed into the class
774 in C<$class>. In the second form, the anonymous hash is blessed into
782 you can use the C<blessed> function exported by L<Scalar::Util>, which
785 use Scalar::Util 'blessed';
787 if ( defined blessed($thing) ) { ... }
790 of the package the object has been blessed into. If C<$thing> doesn't
791 contain a reference to a blessed object, the C<blessed> function
794 Note that C<blessed($thing)> will also return false if C<$thing> has
795 been blessed into a class named "0". This is a possible, but quite
800 blessed object specially. If you call C<ref($thing)> and C<$thing>
802 that the object has been blessed into.
805 reference, we recommend that you use C<defined blessed($object)>, since
1005 All the examples so far have shown objects based on a blessed hash.
1010 Here's an example of a module as a blessed scalar: